Skip to content

AppKit macOS xcode16.0 b1

Rolf Bjarne Kvinge edited this page Jun 18, 2024 · 3 revisions

#AppKit.framework

diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.apinotes /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.apinotes
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.apinotes	2024-04-25 05:26:20
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.apinotes	2024-06-01 03:34:09
@@ -7498,6 +7498,10 @@
   SwiftName: NSSpellChecker.OptionKey
 - Name: NSTextEffectStyle
   SwiftName: NSAttributedString.TextEffectStyle
+- Name: NSTextHighlightStyle
+  SwiftName: NSAttributedString.TextHighlightStyle
+- Name: NSTextHighlightColorScheme
+  SwiftName: NSAttributedString.TextHighlightColorScheme
 - Name: NSTextLayoutSectionKey
   SwiftName: NSAttributedString.TextLayoutSectionKey
 - Name: NSTextListMarkerFormat
@@ -8576,6 +8580,8 @@
   SwiftName: zoomButton
 - Name: NSAccessibilityZoomButtonSubrole
   SwiftName: zoomButton
+- Name: NSAdaptiveImageGlyphAttributeName
+  SwiftName: adaptiveImageGlyph
 - Name: NSAlignmentBinding
   SwiftName: alignment
 - Name: NSAllowsEditingMultipleValuesSelectionBindingOption
@@ -10352,6 +10358,10 @@
 - Name: NSTextFieldDatePickerStyle
   Availability: nonswift
   AvailabilityMsg: "prefer 'textField'"
+- Name: NSTextHighlightColorSchemeAttributeName
+  SwiftName: textHighlightColorScheme
+- Name: NSTextHighlightStyleAttributeName
+  SwiftName: textHighlightStyle
 - Name: NSTextInputContextKeyboardSelectionDidChangeNotification
   SwiftName: NSTextInputContext.keyboardSelectionDidChangeNotification
 - Name: NSTextLayoutSectionsAttribute
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h	2024-04-25 05:49:27
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h	2024-06-01 03:52:41
@@ -34,6 +34,7 @@
 #import <AppKit/NSColorSampler.h>
 #import <AppKit/NSControl.h>
 #import <AppKit/NSDiffableDataSource.h>
+#import <AppKit/NSDirection.h>
 #import <AppKit/NSDockTile.h>
 #import <AppKit/NSFont.h>
 #import <AppKit/NSFontAssetRequest.h>
@@ -126,6 +127,7 @@
 #import <AppKit/NSScroller.h>
 #import <AppKit/NSSegmentedControl.h>
 #import <AppKit/NSSegmentedCell.h>
+#import <AppKit/NSSharingCollaborationModeRestriction.h>
 #import <AppKit/NSSharingService.h>
 #import <AppKit/NSSlider.h>
 #import <AppKit/NSSliderCell.h>
@@ -276,3 +278,4 @@
 #import <AppKit/NSTextLineFragment.h>
 #import <AppKit/NSTextViewportLayoutController.h>
 #import <AppKit/NSTextAttachmentCell.h>
+#import <AppKit/NSAdaptiveImageGlyph.h>
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAdaptiveImageGlyph.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAdaptiveImageGlyph.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAdaptiveImageGlyph.h	1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAdaptiveImageGlyph.h	2024-06-01 03:52:50
@@ -0,0 +1,49 @@
+#if (defined(USE_APPKIT_PUBLIC_HEADERS) && USE_APPKIT_PUBLIC_HEADERS) || !__has_include(<UIFoundation/NSAdaptiveImageGlyph.h>)
+#include <TargetConditionals.h>
+
+#if !TARGET_OS_IPHONE
+//
+//  NSAdaptiveImageGlyph.h
+//  Text Kit
+//
+//  Copyright (c) 2024, Apple Inc. All rights reserved.
+//
+
+#import <Foundation/NSAttributedString.h>
+#import <CoreText/CTRunDelegate.h>
+#import <AppKit/AppKitDefines.h>
+
+@protocol CTAdaptiveImageProviding;
+@class UTType;
+
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+// NSAdaptiveImageGlyph is a data model object representing an image containing multiple resolutions and representations conforming to the image format described by NSAdaptiveImageGlyph.contentType. It can be applied to a range of text with NSAttributedString.Key.adaptiveImageGlyph (NSAdaptiveImageGlyphAttributeName).
+
+API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0)) NS_SWIFT_SENDABLE
+@interface NSAdaptiveImageGlyph : NSObject <NSCopying, NSSecureCoding, CTAdaptiveImageProviding>
+
+- (instancetype)initWithImageContent:(NSData*)imageContent NS_DESIGNATED_INITIALIZER; // Initialization: imageContent must conform to the image data format identified by contentType
+- (instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
+- (instancetype)init NS_UNAVAILABLE;
+
+@property (readonly) NSData *imageContent;
+
+// Unique identifier, derived from the underlying image data which can be used as a persistent / durable way to reference the content represented by this adaptive image glyph instance.
+@property (readonly) NSString *contentIdentifier;
+
+// Brief textual alternate representation of the represented contents, useful for non-graphical depiction of the image data or searching.  Note that the value of this property is derived from the underlying image data.
+@property (readonly, copy) NSString *contentDescription;
+
+@property (class, readonly) UTType *contentType; // A UTType identifying the image data format
+@end
+
+@interface NSAttributedString (NSAttributedStringAdaptiveImageGlyphConveniences)
+// A convenience method for creating an attributed string containing an NSAdaptiveImageGlyph with attributes using NSAttachmentCharacter as the base character.
++ (instancetype)attributedStringWithAdaptiveImageGlyph:(NSAdaptiveImageGlyph *)adaptiveImageGlyph attributes:(NSDictionary<NSAttributedStringKey, id> *)attributes API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+@end
+NS_HEADER_AUDIT_END(nullability, sendability)
+#endif // !TARGET_OS_IPHONE
+#else
+#import <UIFoundation/NSAdaptiveImageGlyph.h>
+#endif
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h	2024-04-25 05:49:40
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h	2024-06-01 03:52:55
@@ -209,7 +209,8 @@
 - (void)deactivate;
 
 /// Makes the receiver the active app.
-- (void)activateIgnoringOtherApps:(BOOL)flag API_DEPRECATED("This method will be deprecated in a future release. Use NSApp.activate instead.", macos(10.0, API_TO_BE_DEPRECATED));
+/// - Parameter ignoreOtherApps: If `NO`, the app is activated only if no other app is currently active. If `YES`, the app activates regardless.
+- (void)activateIgnoringOtherApps:(BOOL)ignoreOtherApps API_DEPRECATED("This method will be deprecated in a future release. Use NSApp.activate instead.", macos(10.0, API_TO_BE_DEPRECATED));
 
 /// Makes the receiver the active app, if possible.
 ///
@@ -344,7 +345,7 @@
 
 @interface NSApplication(NSEvent)
 - (void)sendEvent:(NSEvent *)event;
-- (void)postEvent:(NSEvent *)event atStart:(BOOL)flag;
+- (void)postEvent:(NSEvent *)event atStart:(BOOL)atStart;
 @property (nullable, readonly, strong) NSEvent *currentEvent;
 - (nullable NSEvent *)nextEventMatchingMask:(NSEventMask)mask untilDate:(nullable NSDate *)expiration inMode:(NSRunLoopMode)mode dequeue:(BOOL)deqFlag;
 - (void)discardEventsMatchingMask:(NSEventMask)mask beforeEvent:(nullable NSEvent *)lastEvent;
@@ -369,9 +370,9 @@
 @end
 
 @interface NSApplication(NSFullKeyboardAccess)
-/**
- Use this method to get the status of Full Keyboard Access, as configured in the Keyboard preference pane. You may use this status to implement your own key loop or to implement in-control tabbing behavior similar to @c NSTableView. Because of the nature of the preference storage, you will not be notified of changes to the key if you attempt to observe it via key-value observing; however, calling this method is fairly inexpensive, so you should always call it when you need the underlying value instead of caching it.
- */
+/// A Boolean value indicating whether keyboard navigation is enabled in System Settings > Keyboard.
+/// - Note: The value of this property is `YES` if keyboard navigation is enabled or `NO` if it’s not. You might use this value to implement your own key loop or to implement in-control tabbing behavior similar to `NSTableView`. Because of the nature of the preference storage, you won’t be notified of changes to this property if you attempt to observe it through key-value observing; however, accessing this property is fairly inexpensive, so you can access it directly rather than caching it.
+/// - Note: This property’s value isn’t necessarily reflective of the separate accessibility setting named “Full Keyboard Access” in System Settings > Accessibility > Keyboard.
 @property (getter=isFullKeyboardAccessEnabled, readonly) BOOL fullKeyboardAccessEnabled API_AVAILABLE(macos(10.6));
 @end
 
@@ -415,7 +416,7 @@
 - (BOOL)application:(NSApplication *)sender printFile:(NSString *)filename NS_SWIFT_UI_ACTOR;
 - (NSApplicationPrintReply)application:(NSApplication *)application printFiles:(NSArray<NSString *> *)fileNames withSettings:(NSDictionary<NSPrintInfoAttributeKey, id> *)printSettings showPrintPanels:(BOOL)showPrintPanels NS_SWIFT_UI_ACTOR;
 - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender NS_SWIFT_UI_ACTOR;
-- (BOOL)applicationShouldHandleReopen:(NSApplication *)sender hasVisibleWindows:(BOOL)flag NS_SWIFT_UI_ACTOR;
+- (BOOL)applicationShouldHandleReopen:(NSApplication *)sender hasVisibleWindows:(BOOL)hasVisibleWindows NS_SWIFT_UI_ACTOR;
 - (nullable NSMenu *)applicationDockMenu:(NSApplication *)sender NS_SWIFT_UI_ACTOR;
 - (NSError *)application:(NSApplication *)application willPresentError:(NSError *)error NS_SWIFT_UI_ACTOR;
 
@@ -700,7 +701,7 @@
 - (void)endSheet:(NSWindow *)sheet API_DEPRECATED("Use -[NSWindow endSheet:] instead", macos(10.0,10.10));
 - (void)endSheet:(NSWindow *)sheet returnCode:(NSInteger)returnCode API_DEPRECATED("Use -[NSWindow endSheet:returnCode:] instead", macos(10.0,10.10));
 
-- (nullable NSWindow *)makeWindowsPerform:(SEL)selector inOrder:(BOOL)flag API_DEPRECATED("Use -enumerateWindowsWithOptions:usingBlock: instead", macos(10.0,10.14));
+- (nullable NSWindow *)makeWindowsPerform:(SEL)selector inOrder:(BOOL)inOrder API_DEPRECATED("Use -enumerateWindowsWithOptions:usingBlock: instead", macos(10.0,10.14));
 
 /**
  This method is deprecated as of macOS 10.12. Beginning in OS X 10.11 it would always return nil. Prior to this it would return an undefined graphics context that was not generally suitable for drawing.
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAttributedString.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAttributedString.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAttributedString.h	2024-04-25 05:49:40
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAttributedString.h	2024-06-01 03:52:55
@@ -1,146 +1,267 @@
-#if !__has_include(<UIFoundation/NSAttributedString.h>)
+#if (defined(USE_APPKIT_PUBLIC_HEADERS) && USE_APPKIT_PUBLIC_HEADERS) || !__has_include(<UIFoundation/NSAttributedString.h>)
+#include <TargetConditionals.h>
+
+#if !TARGET_OS_IPHONE
+#import <AppKit/AppKitDefines.h>
+
 /*
         NSAttributedString.h
-        Copyright (c) 1994-2023, Apple Inc.
+        Copyright (c) 1994-2024, Apple Inc.
         All rights reserved.
  
         This file defines Application Kit extensions to NSAttributedString and NSMutableAttributedString.
 */
 
 #import <Foundation/NSAttributedString.h>
-#import <Foundation/NSItemProvider.h>
-#import <AppKit/NSFontManager.h>
-#import <AppKit/NSText.h>
-#import <AppKit/NSPasteboard.h>
-#import <AppKit/AppKitDefines.h>
-@class NSTextBlock, NSTextTable, NSTextList;
+
+@class NSAttributedString;
 @class NSFileWrapper;
 @class NSURL;
 
 NS_HEADER_AUDIT_BEGIN(nullability, sendability)
-#if !TARGET_OS_IPHONE
 
 /************************ Attributes ************************/
 
 // Predefined character attributes for text. If the key is not present in the dictionary, it indicates the default value described below.
-APPKIT_EXTERN NSAttributedStringKey  NSFontAttributeName API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));                // NSFont, default Helvetica(Neue) 12
-APPKIT_EXTERN NSAttributedStringKey  NSParagraphStyleAttributeName API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));      // NSParagraphStyle, default defaultParagraphStyle
-APPKIT_EXTERN NSAttributedStringKey  NSForegroundColorAttributeName API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));     // NSColor, default blackColor
-APPKIT_EXTERN NSAttributedStringKey  NSBackgroundColorAttributeName API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));     // NSColor, default nil: no background
-APPKIT_EXTERN NSAttributedStringKey  NSLigatureAttributeName API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));            // NSNumber containing integer, default 1: default ligatures, 0: no ligatures
-APPKIT_EXTERN NSAttributedStringKey  NSKernAttributeName API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));                // NSNumber containing floating point value, in points; amount to modify default kerning. 0 means kerning is disabled.
-APPKIT_EXTERN NSAttributedStringKey  NSTrackingAttributeName API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));         // NSNumber containing floating point value, in points; amount to modify default tracking. 0 means tracking is disabled.
-APPKIT_EXTERN NSAttributedStringKey  NSStrikethroughStyleAttributeName API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));  // NSNumber containing integer, default 0: no strikethrough
-APPKIT_EXTERN NSAttributedStringKey  NSUnderlineStyleAttributeName API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));      // NSNumber containing integer, default 0: no underline
-APPKIT_EXTERN NSAttributedStringKey  NSStrokeColorAttributeName API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));         // NSColor, default nil: same as foreground color
-APPKIT_EXTERN NSAttributedStringKey  NSStrokeWidthAttributeName API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));         // NSNumber containing floating point value, in percent of font point size, default 0: no stroke; positive for stroke alone, negative for stroke and fill (a typical value for outlined text would be 3.0)
-APPKIT_EXTERN NSAttributedStringKey  NSShadowAttributeName API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));              // NSShadow, default nil: no shadow
-APPKIT_EXTERN NSAttributedStringKey const NSTextEffectAttributeName API_AVAILABLE(macos(10.10), ios(7.0), watchos(2.0), tvos(9.0));          // NSString, default nil: no text effect
+APPKIT_EXTERN NSAttributedStringKey NSFontAttributeName API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));                // UIFont, default Helvetica(Neue) 12
+APPKIT_EXTERN NSAttributedStringKey NSParagraphStyleAttributeName API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));      // NSParagraphStyle, default defaultParagraphStyle
+APPKIT_EXTERN NSAttributedStringKey NSForegroundColorAttributeName API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));     // UIColor, default blackColor
+APPKIT_EXTERN NSAttributedStringKey NSBackgroundColorAttributeName API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));     // UIColor, default nil: no background
+APPKIT_EXTERN NSAttributedStringKey NSLigatureAttributeName API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));            // NSNumber containing integer, default 1: default ligatures, 0: no ligatures
+APPKIT_EXTERN NSAttributedStringKey NSKernAttributeName API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));                // NSNumber containing floating point value, in points; amount to modify default kerning. 0 means kerning is disabled.
+APPKIT_EXTERN NSAttributedStringKey NSTrackingAttributeName API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0), visionos(1.0));          // NSNumber containing floating point value, in points; amount to modify default tracking. 0 means tracking is disabled.
+APPKIT_EXTERN NSAttributedStringKey NSStrikethroughStyleAttributeName API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));  // NSNumber containing integer, default 0: no strikethrough
+APPKIT_EXTERN NSAttributedStringKey NSUnderlineStyleAttributeName API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));      // NSNumber containing integer, default 0: no underline
+APPKIT_EXTERN NSAttributedStringKey NSStrokeColorAttributeName API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));         // UIColor, default nil: same as foreground color
+APPKIT_EXTERN NSAttributedStringKey NSStrokeWidthAttributeName API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));         // NSNumber containing floating point value, in percent of font point size, default 0: no stroke; positive for stroke alone, negative for stroke and fill (a typical value for outlined text would be 3.0)
+APPKIT_EXTERN NSAttributedStringKey NSShadowAttributeName API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));              // NSShadow, default nil: no shadow
+APPKIT_EXTERN NSAttributedStringKey const NSTextEffectAttributeName API_AVAILABLE(macos(10.10), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));          // NSString, default nil: no text effect
 
-APPKIT_EXTERN NSAttributedStringKey  NSAttachmentAttributeName API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));          // NSTextAttachment, default nil
-APPKIT_EXTERN NSAttributedStringKey  NSLinkAttributeName API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));                // NSURL (preferred) or NSString
-APPKIT_EXTERN NSAttributedStringKey  NSBaselineOffsetAttributeName API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));      // NSNumber containing floating point value, in points; offset from baseline, default 0
-APPKIT_EXTERN NSAttributedStringKey  NSUnderlineColorAttributeName API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));      // NSColor, default nil: same as foreground color
-APPKIT_EXTERN NSAttributedStringKey  NSStrikethroughColorAttributeName API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));  // NSColor, default nil: same as foreground color
+APPKIT_EXTERN NSAttributedStringKey NSAttachmentAttributeName API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));          // NSTextAttachment, default nil
+APPKIT_EXTERN NSAttributedStringKey NSLinkAttributeName API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));                // NSURL (preferred) or NSString
+APPKIT_EXTERN NSAttributedStringKey NSBaselineOffsetAttributeName API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));      // NSNumber containing floating point value, in points; offset from baseline, default 0
+APPKIT_EXTERN NSAttributedStringKey NSUnderlineColorAttributeName API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));      // UIColor, default nil: same as foreground color
+APPKIT_EXTERN NSAttributedStringKey NSStrikethroughColorAttributeName API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));  // UIColor, default nil: same as foreground color
 
-APPKIT_EXTERN NSAttributedStringKey  NSWritingDirectionAttributeName API_AVAILABLE(macos(10.6), ios(7.0), watchos(2.0), tvos(9.0));    // NSArray of NSNumbers representing the nested levels of writing direction overrides as defined by Unicode LRE, RLE, LRO, and RLO characters.  The control characters can be obtained by masking NSWritingDirection and NSWritingDirectionFormatType values.  LRE: NSWritingDirectionLeftToRight|NSWritingDirectionEmbedding, RLE: NSWritingDirectionRightToLeft|NSWritingDirectionEmbedding, LRO: NSWritingDirectionLeftToRight|NSWritingDirectionOverride, RLO: NSWritingDirectionRightToLeft|NSWritingDirectionOverride,
+APPKIT_EXTERN NSAttributedStringKey NSWritingDirectionAttributeName API_AVAILABLE(macos(10.6), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));    // NSArray of NSNumbers representing the nested levels of writing direction overrides as defined by Unicode LRE, RLE, LRO, and RLO characters.  The control characters can be obtained by masking NSWritingDirection and NSWritingDirectionFormatType values.  LRE: NSWritingDirectionLeftToRight|NSWritingDirectionEmbedding, RLE: NSWritingDirectionRightToLeft|NSWritingDirectionEmbedding, LRO: NSWritingDirectionLeftToRight|NSWritingDirectionOverride, RLO: NSWritingDirectionRightToLeft|NSWritingDirectionOverride,
 
-APPKIT_EXTERN NSAttributedStringKey NSCursorAttributeName; // NSCursor, default IBeamCursor
-APPKIT_EXTERN NSAttributedStringKey NSToolTipAttributeName; // NSString, default nil: no tooltip
+// NSTextHighlightStyleAttributeName is a character-level NSAttributedStringKey for decorating a section of text highlighted for emphasis.
+APPKIT_EXTERN NSAttributedStringKey const NSTextHighlightStyleAttributeName API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0)); // NSTextHighlightStyle, default nil: no highlight
 
-APPKIT_EXTERN NSAttributedStringKey NSMarkedClauseSegmentAttributeName; // Clause segment index NSNumber (intValue). This attribute is used in marked text indicating clause segments
+// NSTextHighlightColorSchemeAttributeName is a character-level NSAttributedStringKey for specifying the color scheme used by NSTextHighlightStyleAttributeName at the same range.
+APPKIT_EXTERN NSAttributedStringKey const NSTextHighlightColorSchemeAttributeName API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0)); // The default color scheme. The color is based on the tint/accent color for the rendering context. By default UIKit uses UIView.tintColor and AppKit uses NSColor.controlAccentColor.
 
-APPKIT_EXTERN NSAttributedStringKey NSTextAlternativesAttributeName API_AVAILABLE(macos(10.8)); // An NSTextAlternatives object.  Used primarily as a temporary attribute, with primaryString equal to the substring for the range to which it is attached, and alternativeStrings representing alternatives for that string that may be presented to the user.
+APPKIT_EXTERN NSAttributedStringKey const NSAdaptiveImageGlyphAttributeName API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0)); // NSAdaptiveImageGlyph, default nil
 
-APPKIT_EXTERN NSAttributedStringKey NSSpellingStateAttributeName;  // NSSpellingStateAttributeName is used and recognized only as a temporary attribute (see NSLayoutManager.h).  It indicates that spelling and/or grammar indicators should be shown for the specified characters, default 0: no spelling or grammar indicator
-
-
-APPKIT_EXTERN NSAttributedStringKey NSSuperscriptAttributeName; // NSNumber containing integer, default 0
-APPKIT_EXTERN NSAttributedStringKey NSGlyphInfoAttributeName;  // NSGlyphInfo specifying glyph for the associated attribute range
-
-
 /************************ Attribute values ************************/
 // This defines currently supported values for NSUnderlineStyleAttributeName and NSStrikethroughStyleAttributeName. These values are or'ed together to produce an underline style.
 // Underlines will be drawn with a solid pattern by default, so NSUnderlineStylePatternSolid does not need to be specified.
 typedef NS_OPTIONS(NSInteger, NSUnderlineStyle) {
     NSUnderlineStyleNone                                    = 0x00,
     NSUnderlineStyleSingle                                  = 0x01,
-    NSUnderlineStyleThick API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0))      = 0x02,
-    NSUnderlineStyleDouble API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0))     = 0x09,
+    NSUnderlineStyleThick API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0))      = 0x02,
+    NSUnderlineStyleDouble API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0))     = 0x09,
 
-    NSUnderlineStylePatternSolid API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0))      = 0x0000,
-    NSUnderlineStylePatternDot API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0))        = 0x0100,
-    NSUnderlineStylePatternDash API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0))       = 0x0200,
-    NSUnderlineStylePatternDashDot API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0))    = 0x0300,
-    NSUnderlineStylePatternDashDotDot API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0)) = 0x0400,
+    NSUnderlineStylePatternSolid API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0))      = 0x0000,
+    NSUnderlineStylePatternDot API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0))        = 0x0100,
+    NSUnderlineStylePatternDash API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0))       = 0x0200,
+    NSUnderlineStylePatternDashDot API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0))    = 0x0300,
+    NSUnderlineStylePatternDashDotDot API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0)) = 0x0400,
 
-    NSUnderlineStyleByWord API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0))            = 0x8000
-} API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));
+    NSUnderlineStyleByWord API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0))            = 0x8000
+} API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
 // NSWritingDirectionFormatType values used by NSWritingDirectionAttributeName. It is or'ed with either NSWritingDirectionLeftToRight or NSWritingDirectionRightToLeft. Can specify the formatting controls defined by Unicode Bidirectional Algorithm.
 typedef NS_ENUM(NSInteger, NSWritingDirectionFormatType) {
     NSWritingDirectionEmbedding     = (0 << 1),
     NSWritingDirectionOverride      = (1 << 1)
-} API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
+} API_AVAILABLE(macos(10.11), ios(9.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
 // NSTextEffectAttributeName values
-typedef NSString * NSTextEffectStyle NS_TYPED_ENUM;
-APPKIT_EXTERN NSTextEffectStyle const NSTextEffectLetterpressStyle API_AVAILABLE(macos(10.10), ios(7.0), watchos(2.0), tvos(9.0));
+typedef NSString * NSTextEffectStyle NS_TYPED_ENUM API_AVAILABLE(macos(10.10), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSTextEffectStyle const NSTextEffectLetterpressStyle API_AVAILABLE(macos(10.10), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
-// Flag values supported for NSSpellingStateAttributeName as of Mac OS X version 10.5.  Prior to 10.5, any non-zero value caused the spelling indicator to be shown.
-typedef NS_ENUM(NSInteger, NSSpellingState) {
-    NSSpellingStateSpellingFlag API_AVAILABLE(macos(10.5)) = (1 << 0),
-    NSSpellingStateGrammarFlag API_AVAILABLE(macos(10.5))  = (1 << 1)
-};
+// NSTextHighlightStyleAttributeName values
+typedef NSString * NSTextHighlightStyle NS_TYPED_EXTENSIBLE_ENUM API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+APPKIT_EXTERN NSTextHighlightStyle const NSTextHighlightStyleDefault API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0)); // The system-defined default highlight type. Supported only with TextKit2
 
+// NSTextHighlightColorSchemeAttributeName values
+typedef NSString * NSTextHighlightColorScheme NS_TYPED_EXTENSIBLE_ENUM API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+APPKIT_EXTERN NSTextHighlightColorScheme const NSTextHighlightColorSchemeDefault API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0)); // The system-defined default highlight type. Supported only with TextKit2
+APPKIT_EXTERN NSTextHighlightColorScheme const NSTextHighlightColorSchemePurple API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+APPKIT_EXTERN NSTextHighlightColorScheme const NSTextHighlightColorSchemePink API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+APPKIT_EXTERN NSTextHighlightColorScheme const NSTextHighlightColorSchemeOrange API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+APPKIT_EXTERN NSTextHighlightColorScheme const NSTextHighlightColorSchemeMint API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+APPKIT_EXTERN NSTextHighlightColorScheme const NSTextHighlightColorSchemeBlue API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+
+
 /************************ Attribute fixing ************************/
 
 @interface NSMutableAttributedString (NSAttributedStringAttributeFixing)
 // This method fixes attribute inconsistencies inside range.  It ensures NSFontAttributeName covers the characters, NSParagraphStyleAttributeName is only changing at paragraph boundaries, and NSTextAttachmentAttributeName is assigned to NSAttachmentCharacter.  NSTextStorage automatically invokes this method via -ensureAttributesAreFixedInRange:.
-- (void)fixAttributesInRange:(NSRange)range API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));
+- (void)fixAttributesInRange:(NSRange)range API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
-- (void)fixFontAttributeInRange:(NSRange)range;
-- (void)fixParagraphStyleAttributeInRange:(NSRange)range;
-- (void)fixAttachmentAttributeInRange:(NSRange)range;
 @end
 
 
 /************************ Document formats ************************/
 
-typedef NSString * NSAttributedStringDocumentType NS_TYPED_EXTENSIBLE_ENUM;
+typedef NSString * NSAttributedStringDocumentType NS_TYPED_EXTENSIBLE_ENUM API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
 // Supported document types for the NSDocumentTypeDocumentAttribute key in the document attributes dictionary.
-APPKIT_EXTERN NSAttributedStringDocumentType  NSPlainTextDocumentType API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));
-APPKIT_EXTERN NSAttributedStringDocumentType  NSRTFTextDocumentType  API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));
-APPKIT_EXTERN NSAttributedStringDocumentType  NSRTFDTextDocumentType API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));
-APPKIT_EXTERN NSAttributedStringDocumentType  NSHTMLTextDocumentType  API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));
-APPKIT_EXTERN NSAttributedStringDocumentType NSMacSimpleTextDocumentType;
-APPKIT_EXTERN NSAttributedStringDocumentType NSDocFormatTextDocumentType;
-APPKIT_EXTERN NSAttributedStringDocumentType NSWordMLTextDocumentType;
-APPKIT_EXTERN NSAttributedStringDocumentType NSWebArchiveTextDocumentType;
-APPKIT_EXTERN NSAttributedStringDocumentType NSOfficeOpenXMLTextDocumentType API_AVAILABLE(macos(10.5));
-APPKIT_EXTERN NSAttributedStringDocumentType NSOpenDocumentTextDocumentType API_AVAILABLE(macos(10.5));
+APPKIT_EXTERN NSAttributedStringDocumentType NSPlainTextDocumentType API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSAttributedStringDocumentType NSRTFTextDocumentType  API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSAttributedStringDocumentType NSRTFDTextDocumentType API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSAttributedStringDocumentType NSHTMLTextDocumentType  API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
-typedef NSString * NSTextLayoutSectionKey NS_TYPED_ENUM;
+typedef NSString * NSTextLayoutSectionKey NS_TYPED_ENUM API_AVAILABLE(macos(10.7), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
 // Keys for NSLayoutOrientationSectionsAttribute.
-APPKIT_EXTERN NSTextLayoutSectionKey  NSTextLayoutSectionOrientation API_AVAILABLE(macos(10.7), ios(7.0), watchos(2.0), tvos(9.0)); // NSNumber containing NSTextLayoutOrientation value. default: NSTextLayoutOrientationHorizontal
-APPKIT_EXTERN NSTextLayoutSectionKey  NSTextLayoutSectionRange API_AVAILABLE(macos(10.7), ios(7.0), watchos(2.0), tvos(9.0)); // NSValue containing NSRange representing a character range. default: a range covering the whole document
+APPKIT_EXTERN NSTextLayoutSectionKey NSTextLayoutSectionOrientation API_AVAILABLE(macos(10.7), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0)); // NSNumber containing NSTextLayoutOrientation value. default: NSTextLayoutOrientationHorizontal
+APPKIT_EXTERN NSTextLayoutSectionKey NSTextLayoutSectionRange API_AVAILABLE(macos(10.7), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0)); // NSValue containing NSRange representing a character range. default: a range covering the whole document
 
 // Supported values for NSTextScalingDocumentAttribute, NSSourceTextScalingDocumentAttribute, NSTargetTextScalingDocumentOption, NSSourceTextScalingDocumentOption
 typedef NS_ENUM(NSInteger, NSTextScalingType) {
     NSTextScalingStandard = 0,  // Font sizes throughout the document should appear visually similar to how they would render on macOS and non-Apple platforms
     NSTextScalingiOS  // Font sizes throughout the document should appear visually similar to how they would render on iOS
-} API_AVAILABLE(macos(10.15), ios(13.0));
+} API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0), visionos(1.0));
 
-typedef NSString * NSAttributedStringDocumentAttributeKey NS_TYPED_EXTENSIBLE_ENUM;
+typedef NSString * NSAttributedStringDocumentAttributeKey NS_TYPED_EXTENSIBLE_ENUM API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
 // Keys for options and document attributes dictionaries.  They are in and out document properties used by both read/write methods.
 
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey  NSDocumentTypeDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));  // @"DocumentType", one of the document types declared above.  For reader methods, this key in options can specify the document type for interpreting the contents.  Upon return, the document attributes can contain this key for indicating the actual format used to read the contents.  For write methods, this key specifies the format for generating the data.
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSDocumentTypeDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));  // @"DocumentType", one of the document types declared above.  For reader methods, this key in options can specify the document type for interpreting the contents.  Upon return, the document attributes can contain this key for indicating the actual format used to read the contents.  For write methods, this key specifies the format for generating the data.
 
+
+// NSPlainTextDocumentType document attributes
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSCharacterEncodingDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));  // @"CharacterEncoding", NSNumber containing integer specifying NSStringEncoding for the file; default for plain text is the default encoding.  This key in options can specify the string encoding for reading the data.  Upon return, the document attributes can contain the actual encoding used.  For writing methods, this value is used for generating the plain text data.
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSDefaultAttributesDocumentAttribute API_AVAILABLE(macos(10.11), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));  // @"DefaultAttributes", NSDictionary containing attributes to be applied to plain files.  Used by reader methods.  This key in options can specify the default attributes applied to the entire document contents.  The document attributes can contain this key indicating the actual attributes used.
+
+
+// NSRTFTextDocumentType and NSRTFDTextDocumentType document attributes
+// Document dimension
+// They are document attributes used by read/write methods.
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSPaperSizeDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));  // @"PaperSize", NSValue containing CGSize (in points)
+
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSViewSizeDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));  // @"ViewSize", NSValue containing CGSize (in points)
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSViewZoomDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));  // @"ViewZoom", NSNumber containing floating point value (100 == 100% zoom)
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSViewModeDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));  // @"ViewMode", NSNumber containing integer; 0 = normal; 1 = page layout
+
+// NSHTMLTextDocumentType document attributes
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey const NSDefaultFontExcludedDocumentAttribute API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0), visionos(1.0)); // for HTML writing only; NSNumber containing a BOOL, when true the HTML writer will not include font information unless specified
+
+// Document settings
+// They are document attributes used by read/write methods.
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSReadOnlyDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));  // @"ReadOnly", NSNumber containing integer; if missing, or 0 or negative, not readonly; 1 or more, readonly. Note that this has nothing to do with the file system protection on the file, but instead, on how the file should be displayed to the user
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSBackgroundColorDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));  // @"BackgroundColor", UIColor, representing the document-wide page background color
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSHyphenationFactorDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));  // @"HyphenationFactor", NSNumber containing floating point value (0=off, 1=full hyphenation)
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSDefaultTabIntervalDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));  // @"DefaultTabInterval", NSNumber containing floating point value, representing the document-wide default tab stop interval, in points
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSTextLayoutSectionsAttribute API_AVAILABLE(macos(10.7), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));  // NSArray of dictionaries.  Each dictionary describing a layout orientation section.  The dictionary can have two attributes: NSTextLayoutSectionOrientation and NSTextLayoutSectionRange.  When there is a gap between sections, it's assumed to have NSTextLayoutOrientationHorizontal.
+
+// Document text scaling and Cocoa version
+// They are document attributes used by read/write methods.
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey const NSTextScalingDocumentAttribute API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0), visionos(1.0));  // @"TextScaling", one of the text scaling types declared above. Only affects RTF documents.  For reading methods, this indicates the type of text scaling used in the returned attributed string.  For write methods, this attribute can be used in two different ways: (1) Passing only this attribute will overwrite the text scaling metadata in the document, but will not perform any conversion on the font sizes in the document, or (2) Passing both this attribute and NSSourceTextScalingDocumentAttribute will convert the font sizes in the document from the source text scaling type to the text scaling type specified by this attribute.
+
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey const NSSourceTextScalingDocumentAttribute API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0), visionos(1.0));  // @"SourceTextScaling", one of the text scaling types declared above. Only affects RTF documents.  For writing methods, this indicates the type of text scaling in the attributed string that will be used as the base type for conversion.  Use this in conjunction with NSTextScalingDocumentAttribute to convert font point sizes between text scalings when writing attributed strings to RTF.  This attribute is optional and does nothing unless NSTextScalingDocumentAttribute is also specified.
+
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSCocoaVersionDocumentAttribute API_AVAILABLE(macos(10.4), ios(13.0), watchos(6.0), tvos(13.0), visionos(1.0));  // @"CocoaRTFVersion", NSNumber containing integer.  Stores the version of Cocoa the file was created with.  NSNumber containing float.  Absence of this value indicates file not labelled as being created by Cocoa or its predecessors.  Values less than 100 are pre-Mac OS X; 100 is Mac OS X 10.0 and 10.1; 102 is Mac OS X 10.2 and 10.3; values greater than 102 correspond to values of NSAppKitVersionNumber on 10.4-10.14 systems.  Beginning with iOS 13 and macOS 10.15, this version number does not have a one-to-one correspondence with any single system framework version, but is guaranteed to monotonically increase with each OS version.
+
+typedef NSString * NSAttributedStringDocumentReadingOptionKey NS_TYPED_EXTENSIBLE_ENUM API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));
+
+APPKIT_EXTERN NSAttributedStringDocumentReadingOptionKey NSDocumentTypeDocumentOption API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));  // @"DocumentType", NSString indicating a document type to be forced when loading the document, specified as one of the NSDocumentTypeDocumentAttribute constants listed above
+APPKIT_EXTERN NSAttributedStringDocumentReadingOptionKey NSDefaultAttributesDocumentOption API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));  // @"DefaultAttributes", for plain text only; NSDictionary containing attributes to be applied to plain files
+APPKIT_EXTERN NSAttributedStringDocumentReadingOptionKey NSCharacterEncodingDocumentOption API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));  // @"CharacterEncoding", for plain text and HTML; NSNumber containing integer specifying NSStringEncoding to be used to interpret the file
+
+APPKIT_EXTERN NSAttributedStringDocumentReadingOptionKey const NSTargetTextScalingDocumentOption API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0), visionos(1.0));  // @"TargetTextScaling", one of the text scaling types declared above.  Only affects RTF documents.  For reading methods, you can pass this option to request that the returned attributed string uses the specified scaling.  The font point sizes in the document may be converted if necessary.  If this option is not provided, the system will deduce the target text scaling type based on application framework and platform.
+
+APPKIT_EXTERN NSAttributedStringDocumentReadingOptionKey const NSSourceTextScalingDocumentOption API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0), visionos(1.0));  // @"SourceTextScaling", one of the text scaling types declared above.  Only affects RTF documents.  For reading methods, you can pass this option to indicate the source text scaling type of the RTF document being read.  Use this in conjunction with NSTargetTextScalingDocumentOption to control text scaling conversions on the font point sizes in the returned attributed string.  This option does nothing unless NSTargetTextScalingDocumentOption is also specified.  If this option is not provided, the system will deduce the source text scaling type based on the information in the document.
+
+
+@interface NSAttributedString (NSAttributedStringDocumentFormats)
+// Methods initializing the receiver contents with an external document data.  options specify document attributes for interpreting the document contents.  NSDocumentTypeDocumentAttribute, NSCharacterEncodingDocumentAttribute, and NSDefaultAttributesDocumentAttribute are supported options key.  When they are not specified, these methods will examine the data and do their best to detect the appropriate attributes.  If dict is non-NULL, it will return a dictionary with various document-wide attributes accessible via NS...DocumentAttribute keys.
+- (nullable instancetype)initWithURL:(NSURL *)url options:(NSDictionary<NSAttributedStringDocumentReadingOptionKey, id> *)options documentAttributes:(NSDictionary<NSAttributedStringDocumentAttributeKey, id> * __nullable * __nullable)dict error:(NSError **)error API_AVAILABLE(macos(10.4), ios(9.0), tvos(9.0), watchos(2.0), visionos(1.0));
+- (nullable instancetype)initWithData:(NSData *)data options:(NSDictionary<NSAttributedStringDocumentReadingOptionKey, id> *)options documentAttributes:(NSDictionary<NSAttributedStringDocumentAttributeKey, id> * __nullable * __nullable)dict error:(NSError **)error API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+
+// Generates an NSData object for the receiver contents in range.  It requires a document attributes dict specifying at least the NSDocumentTypeDocumentAttribute to determine the format to be written.
+- (nullable NSData *)dataFromRange:(NSRange)range documentAttributes:(NSDictionary<NSAttributedStringDocumentAttributeKey, id> *)dict error:(NSError **)error API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+
+// Returns an NSFileWrapper object for the receiver contents in range.  It requires a document attributes dict specifying at least the NSDocumentTypeDocumentAttribute to determine the format to be written.  The method returns a directory file wrapper for those document types represented by a file package such as NSRTFDTextDocumentType; otherwise, it returns a regular-file file wrapper.
+- (nullable NSFileWrapper *)fileWrapperFromRange:(NSRange)range documentAttributes:(NSDictionary<NSAttributedStringDocumentAttributeKey, id> *)dict error:(NSError **)error API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+
+@end
+
+@interface NSMutableAttributedString (NSMutableAttributedStringDocumentFormats)
+// Methods replacing the receiver contents with an external document data.  options specify document attributes for interpreting the document contents.  NSDocumentTypeDocumentAttribute, NSCharacterEncodingDocumentAttribute, and NSDefaultAttributesDocumentAttribute are supported options key.  When they are not specified, these methods will examine the data and do their best to detect the appropriate attributes.  If dict is non-NULL, it will return a dictionary with various document-wide attributes accessible via NS...DocumentAttribute keys.
+- (BOOL)readFromURL:(NSURL *)url options:(NSDictionary<NSAttributedStringDocumentReadingOptionKey, id> *)opts documentAttributes:(NSDictionary<NSAttributedStringDocumentAttributeKey, id> * __nullable * __nullable)dict error:(NSError **)error  API_AVAILABLE(macosx(10.5), ios(9.0), watchos(2.0), tvos(9.0));
+- (BOOL)readFromData:(NSData *)data options:(NSDictionary<NSAttributedStringDocumentReadingOptionKey, id> *)opts documentAttributes:(NSDictionary<NSAttributedStringDocumentAttributeKey, id> * __nullable * __nullable)dict error:(NSError **)error API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+@end
+
+
+/************************ Misc methods ************************/
+@interface NSAttributedString (NSAttributedStringKitAdditions)
+// Returns YES if the receiver contains a property configured (NSAttachmentAttributeName with NSAttachmentCharacter) in range
+- (BOOL)containsAttachmentsInRange:(NSRange)range API_AVAILABLE(macos(10.11), ios(9.0), tvos(9.0), watchos(2.0), visionos(1.0));
+
+// Returns YES when any attribute preferring RTFD found in range. This method should be preferred over containsAttachmentsInRange() for determining its preferred external document format.
+- (BOOL)prefersRTFDInRange:(NSRange)range API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+@end
+
+NS_HEADER_AUDIT_END(nullability, sendability)
+
+#endif // !TARGET_OS_IPHONE
+#else
+#import <UIFoundation/NSAttributedString.h>
+#endif
+
+#import <Foundation/NSAttributedString.h>
+#import <Foundation/NSItemProvider.h>
+#import <AppKit/NSFontManager.h>
+#import <AppKit/NSText.h>
+#import <AppKit/NSPasteboard.h>
+#import <AppKit/AppKitDefines.h>
+
+@class NSTextBlock, NSTextTable, NSTextList;
+@class NSFileWrapper;
+@class NSURL;
+
+#if !TARGET_OS_IPHONE
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+APPKIT_EXTERN NSAttributedStringKey NSCursorAttributeName; // NSCursor, default IBeamCursor
+APPKIT_EXTERN NSAttributedStringKey NSToolTipAttributeName; // NSString, default nil: no tooltip
+
+APPKIT_EXTERN NSAttributedStringKey NSMarkedClauseSegmentAttributeName; // Clause segment index NSNumber (intValue). This attribute is used in marked text indicating clause segments
+
+APPKIT_EXTERN NSAttributedStringKey NSTextAlternativesAttributeName API_AVAILABLE(macos(10.8)); // An NSTextAlternatives object.  Used primarily as a temporary attribute, with primaryString equal to the substring for the range to which it is attached, and alternativeStrings representing alternatives for that string that may be presented to the user.
+
+APPKIT_EXTERN NSAttributedStringKey NSSpellingStateAttributeName;  // NSSpellingStateAttributeName is used and recognized only as a temporary attribute (see NSLayoutManager.h).  It indicates that spelling and/or grammar indicators should be shown for the specified characters, default 0: no spelling or grammar indicator
+
+
+APPKIT_EXTERN NSAttributedStringKey NSSuperscriptAttributeName; // NSNumber containing integer, default 0
+APPKIT_EXTERN NSAttributedStringKey NSGlyphInfoAttributeName;  // NSGlyphInfo specifying glyph for the associated attribute range
+
+// Flag values supported for NSSpellingStateAttributeName as of Mac OS X version 10.5.  Prior to 10.5, any non-zero value caused the spelling indicator to be shown.
+typedef NS_ENUM(NSInteger, NSSpellingState) {
+    NSSpellingStateSpellingFlag API_AVAILABLE(macos(10.5)) = (1 << 0),
+    NSSpellingStateGrammarFlag API_AVAILABLE(macos(10.5))  = (1 << 1)
+};
+
+/************************ Attribute fixing ************************/
+
+@interface NSMutableAttributedString (NSAttributedStringAppKitAttributeFixing)
+- (void)fixFontAttributeInRange:(NSRange)range;
+- (void)fixParagraphStyleAttributeInRange:(NSRange)range;
+- (void)fixAttachmentAttributeInRange:(NSRange)range;
+@end
+
+APPKIT_EXTERN NSAttributedStringDocumentType NSMacSimpleTextDocumentType;
+APPKIT_EXTERN NSAttributedStringDocumentType NSDocFormatTextDocumentType;
+APPKIT_EXTERN NSAttributedStringDocumentType NSWordMLTextDocumentType;
+APPKIT_EXTERN NSAttributedStringDocumentType NSWebArchiveTextDocumentType;
+APPKIT_EXTERN NSAttributedStringDocumentType NSOfficeOpenXMLTextDocumentType API_AVAILABLE(macos(10.5));
+APPKIT_EXTERN NSAttributedStringDocumentType NSOpenDocumentTextDocumentType API_AVAILABLE(macos(10.5));
+
 APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSConvertedDocumentAttribute;  // @"Converted", NSNumber containing integer; if missing, or 0, the file was originally in the format specified by document type; if negative, the file was originally in the format specified by document type, but the conversion to NSAttributedString may have been lossy; if 1 or more, it was converted to the specified type by a filter service
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSCocoaVersionDocumentAttribute;  // @"CocoaRTFVersion", NSNumber containing integer.  Stores the version of Cocoa the file was created with.  NSNumber containing float.  Absence of this value indicates file not labelled as being created by Cocoa or its predecessors.  Values less than 100 are pre-Mac OS X; 100 is Mac OS X 10.0 and 10.1; 102 is Mac OS X 10.2 and 10.3; values greater than 102 correspond to values of NSAppKitVersionNumber on 10.4 and later systems.
 APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSFileTypeDocumentAttribute API_AVAILABLE(macos(10.6));  // NSString indicating which document type was used to interpret the document, specified as a UTI; for reading, this is available along with NSDocumentTypeDocumentAttribute, but for writing the two are mutually exclusive
 
 APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSTitleDocumentAttribute;  // NSString containing document title
@@ -157,53 +278,17 @@
 APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSCategoryDocumentAttribute API_AVAILABLE(macos(10.6));  // NSString containing the document category
 APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSAppearanceDocumentAttribute API_AVAILABLE(macos(10.14)); // NSAppearance used to evaluate named NSColors when saving. The appearance itself is not written out; it is just used to determine the generated color component values. If not specified the canonical default light appearance is used.
 
-// NSPlainTextDocumentType document attributes
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey  NSCharacterEncodingDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));  // @"CharacterEncoding", NSNumber containing integer specifying NSStringEncoding for the file; default for plain text is the default encoding.  This key in options can specify the string encoding for reading the data.  Upon return, the document attributes can contain the actual encoding used.  For writing methods, this value is used for generating the plain text data.
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey  NSDefaultAttributesDocumentAttribute API_AVAILABLE(macos(10.11), ios(7.0), watchos(2.0), tvos(9.0));  // @"DefaultAttributes", NSDictionary containing attributes to be applied to plain files.  Used by reader methods.  This key in options can specify the default attributes applied to the entire document contents.  The document attributes can contain this key indicating the actual attributes used.
-
-
-// NSRTFTextDocumentType and NSRTFDTextDocumentType document attributes
-// Document dimension
-// They are document attributes used by read/write methods.
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey  NSPaperSizeDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));  // @"PaperSize", NSValue containing NSSize (in points)
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSLeftMarginDocumentAttribute;  // @"LeftMargin", NSNumber containing floating point value (in points)
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSRightMarginDocumentAttribute;  // @"RightMargin", NSNumber containing floating point value (in points)
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSTopMarginDocumentAttribute;  // @"TopMargin", NSNumber containing floating point value (in points)
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSBottomMarginDocumentAttribute;  // @"BottomMargin", NSNumber containing floating point value (in points)
-
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey  NSViewSizeDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));  // @"ViewSize", NSValue containing NSSize (in points)
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey  NSViewZoomDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));  // @"ViewZoom", NSNumber containing floating point value (100 == 100% zoom)
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey  NSViewModeDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));  // @"ViewMode", NSNumber containing integer; 0 = normal; 1 = page layout
-
-// Document settings
-// They are document attributes used by read/write methods.
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey  NSReadOnlyDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));  // @"ReadOnly", NSNumber containing integer; if missing, or 0 or negative, not readonly; 1 or more, readonly. Note that this has nothing to do with the file system protection on the file, but instead, on how the file should be displayed to the user
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey  NSBackgroundColorDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));  // @"BackgroundColor", NSColor, representing the document-wide page background color
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey  NSHyphenationFactorDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));  // @"HyphenationFactor", NSNumber containing floating point value (0=off, 1=full hyphenation)
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey  NSDefaultTabIntervalDocumentAttribute API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));  // @"DefaultTabInterval", NSNumber containing floating point value, representing the document-wide default tab stop interval, in points
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey  NSTextLayoutSectionsAttribute API_AVAILABLE(macos(10.7), ios(7.0), watchos(2.0), tvos(9.0));  // NSArray of dictionaries.  Each dictionary describing a layout orientation section.  The dictionary can have two attributes: NSTextLayoutSectionOrientation and NSTextLayoutSectionRange.  When there is a gap between sections, it's assumed to have NSTextLayoutOrientationHorizontal.
-
 // NSHTMLTextDocumentType document attributes
 // Additional document attributes added in 10.4, for HTML writing only.  These provide control over the form of generated HTML.  NSExcludedElementsDocumentAttribute allows control over the tags used.  The recognized values in the NSExcludedElementsDocumentAttribute array are (case-insensitive) HTML tags, plus DOCTYPE (representing a doctype declaration) and XML (representing an XML declaration).  By default, if this attribute is not present, the excluded elements will be those deprecated in HTML 4 (APPLET, BASEFONT, CENTER, DIR, FONT, ISINDEX, MENU, S, STRIKE, and U) plus XML.  If XML is on the list, HTML forms will be used; if XML is not on the list, XHTML forms will be used where there is a distinction.  Either NSCharacterEncodingDocumentAttribute or NSTextEncodingNameDocumentAttribute may be used to control the encoding used for generated HTML; character entities will be used for characters not representable in the specified encoding.  Finally, NSPrefixSpacesDocumentAttribute allows some control over formatting.
 APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSExcludedElementsDocumentAttribute;  // for HTML writing only; NSArray containing NSStrings, representing HTML elements not to be used in generated HTML
 APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSTextEncodingNameDocumentAttribute;  // for HTML writing only; NSString containing the name, IANA or otherwise, of a text encoding to be used; mutually exclusive with NSCharacterEncodingDocumentAttribute
 APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSPrefixSpacesDocumentAttribute;  // for HTML writing only; NSNumber containing integer, default 0, representing the number of spaces per level by which to indent certain nested HTML elements
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey const NSDefaultFontExcludedDocumentAttribute API_AVAILABLE(macos(14), ios(17), watchos(10), tvos(17)); // for HTML writing only; NSNumber containing a BOOL, when true the HTML writer will not include font information unless specified.
 
-// Document text scaling
-// They are document attributes used by read/write methods.
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey const NSTextScalingDocumentAttribute API_AVAILABLE(macos(10.15), ios(13.0));  // @"TextScaling", one of the text scaling types declared above. Only affects RTF documents.  For reading methods, this indicates the type of text scaling used in the returned attributed string.  For write methods, this attribute can be used in two different ways: (1) Passing only this attribute will overwrite the text scaling metadata in the document, but will not perform any conversion on the font sizes in the document, or (2) Passing both this attribute and NSSourceTextScalingDocumentAttribute will convert the font sizes in the document from the source text scaling type to the text scaling type specified by this attribute.
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSLeftMarginDocumentAttribute;  // @"LeftMargin", NSNumber containing floating point value (in points)
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSRightMarginDocumentAttribute;  // @"RightMargin", NSNumber containing floating point value (in points)
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSTopMarginDocumentAttribute;  // @"TopMargin", NSNumber containing floating point value (in points)
+APPKIT_EXTERN NSAttributedStringDocumentAttributeKey NSBottomMarginDocumentAttribute;  // @"BottomMargin", NSNumber containing floating point value (in points)
 
-APPKIT_EXTERN NSAttributedStringDocumentAttributeKey const NSSourceTextScalingDocumentAttribute API_AVAILABLE(macos(10.15), ios(13.0));  // @"SourceTextScaling", one of the text scaling types declared above. Only affects RTF documents.  For writing methods, this indicates the type of text scaling in the attributed string that will be used as the base type for conversion.  Use this in conjunction with NSTextScalingDocumentAttribute to convert font point sizes between text scalings when writing attributed strings to RTF.  This attribute is optional and does nothing unless NSTextScalingDocumentAttribute is also specified.
-
-// The following are keys for various options that can be specified in the options dictionaries for the text import APIs below.  Except for NSTextSizeMultiplierDocumentOption and NSFileTypeDocumentOption, the values have been recognized for some time, but the actual identifier shown below was added in 10.4. If you want your app to run on earlier systems, you need to continue using the actual string value that these identifiers represent. The actual string value is specified in the comments below.
-
-typedef NSString * NSAttributedStringDocumentReadingOptionKey NS_TYPED_EXTENSIBLE_ENUM;
-
-APPKIT_EXTERN NSAttributedStringDocumentReadingOptionKey  NSDocumentTypeDocumentOption;  // @"DocumentType", NSString indicating a document type to be forced when loading the document, specified as one of the NSDocumentTypeDocumentAttribute constants listed above
-APPKIT_EXTERN NSAttributedStringDocumentReadingOptionKey  NSDefaultAttributesDocumentOption;  // @"DefaultAttributes", for plain text only; NSDictionary containing attributes to be applied to plain files
-APPKIT_EXTERN NSAttributedStringDocumentReadingOptionKey  NSCharacterEncodingDocumentOption;  // @"CharacterEncoding", for plain text and HTML; NSNumber containing integer specifying NSStringEncoding to be used to interpret the file
-
 APPKIT_EXTERN NSAttributedStringDocumentReadingOptionKey NSTextEncodingNameDocumentOption;  // @"TextEncodingName", for HTML only; NSString containing a name, IANA or otherwise, specifying an encoding to be used to interpret the file; mutually exclusive with NSCharacterEncodingDocumentOption
 APPKIT_EXTERN NSAttributedStringDocumentReadingOptionKey NSBaseURLDocumentOption;  // @"BaseURL", for HTML only; NSURL containing a URL to be treated as the base URL for the document
 APPKIT_EXTERN NSAttributedStringDocumentReadingOptionKey NSTimeoutDocumentOption;  // @"Timeout", for HTML only; NSNumber containing floating point value; time in seconds to wait for a document to finish loading; if not present or not positive, a default timeout will be used
@@ -214,21 +299,7 @@
 
 // In Mac OS X 10.4 and later, WebKit is always used for HTML documents, and all of the above options are recognized.  In Mac OS X 10.3, there is an additional options key, @"UseWebKit" (NSNumber containing integer; if present and positive, specifies that WebKit-based HTML importing is to be used).  In Mac OS X 10.3, the Timeout, WebPreferences, and WebResourceLoadDelegate options are recognized only when WebKit-based HTML importing is used.
 
-APPKIT_EXTERN NSAttributedStringDocumentReadingOptionKey const NSTargetTextScalingDocumentOption API_AVAILABLE(macos(10.15), ios(13.0));  // @"TargetTextScaling", one of the text scaling types declared above.  Only affects RTF documents.  For reading methods, you can pass this option to request that the returned attributed string uses the specified scaling.  The font point sizes in the document may be converted if necessary.  If this option is not provided, the system will deduce the target text scaling type based on application framework and platform.
-
-APPKIT_EXTERN NSAttributedStringDocumentReadingOptionKey const NSSourceTextScalingDocumentOption API_AVAILABLE(macos(10.15), ios(13.0));  // @"SourceTextScaling", one of the text scaling types declared above.  Only affects RTF documents.  For reading methods, you can pass this option to indicate the source text scaling type of the RTF document being read.  Use this in conjunction with NSTargetTextScalingDocumentOption to control text scaling conversions on the font point sizes in the returned attributed string.  This option does nothing unless NSTargetTextScalingDocumentOption is also specified.  If this option is not provided, the system will deduce the source text scaling type based on the information in the document.
-
-@interface NSAttributedString (NSAttributedStringDocumentFormats)
-// Methods initializing the receiver contents with an external document data.  options specify document attributes for interpreting the document contents.  NSDocumentTypeDocumentAttribute, NSCharacterEncodingDocumentAttribute, and NSDefaultAttributesDocumentAttribute are supported options key.  When they are not specified, these methods will examine the data and do their best to detect the appropriate attributes.  If dict is non-NULL, it will return a dictionary with various document-wide attributes accessible via NS...DocumentAttribute keys.
-- (nullable instancetype)initWithURL:(NSURL *)url options:(NSDictionary<NSAttributedStringDocumentReadingOptionKey, id> *)options documentAttributes:(NSDictionary<NSAttributedStringDocumentAttributeKey, id> * _Nullable * _Nullable)dict error:(NSError **)error API_AVAILABLE(macos(10.4), ios(9.0), watchos(2.0), tvos(9.0));
-- (nullable instancetype)initWithData:(NSData *)data options:(NSDictionary<NSAttributedStringDocumentReadingOptionKey, id> *)options documentAttributes:(NSDictionary<NSAttributedStringDocumentAttributeKey, id> * _Nullable * _Nullable)dict error:(NSError **)error API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));
-
-// Generates an NSData object for the receiver contents in range.  It requires a document attributes dict specifying at least the NSDocumentTypeDocumentAttribute to determine the format to be written.
-- (nullable NSData *)dataFromRange:(NSRange)range documentAttributes:(NSDictionary<NSAttributedStringDocumentAttributeKey, id> *)dict error:(NSError **)error API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));
-
-// Returns an NSFileWrapper object for the receiver contents in range.  It requires a document attributes dict specifying at least the NSDocumentTypeDocumentAttribute to determine the format to be written.  The method returns a directory file wrapper for those document types represented by a file package such as NSRTFDTextDocumentType; otherwise, it returns a regular-file file wrapper.
-- (nullable NSFileWrapper *)fileWrapperFromRange:(NSRange)range documentAttributes:(NSDictionary<NSAttributedStringDocumentAttributeKey, id> *)dict error:(NSError **)error API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));
-
+@interface NSAttributedString (NSAttributedStringAppKitDocumentFormats)
 - (nullable instancetype)initWithRTF:(NSData *)data documentAttributes:(NSDictionary<NSAttributedStringDocumentAttributeKey, id> * _Nullable * _Nullable)dict;
 - (nullable instancetype)initWithRTFD:(NSData *)data documentAttributes:(NSDictionary<NSAttributedStringDocumentAttributeKey, id> * _Nullable * _Nullable)dict;
 - (nullable instancetype)initWithHTML:(NSData *)data documentAttributes:(NSDictionary<NSAttributedStringDocumentAttributeKey, id> * _Nullable * _Nullable)dict;
@@ -242,24 +313,14 @@
 - (nullable NSData *)docFormatFromRange:(NSRange)range documentAttributes:(NSDictionary<NSAttributedStringDocumentAttributeKey, id> *)dict;
 @end
 
-@interface NSMutableAttributedString (NSMutableAttributedStringDocumentFormats)
-// Methods replacing the receiver contents with an external document data.  options specify document attributes for interpreting the document contents.  NSDocumentTypeDocumentAttribute, NSCharacterEncodingDocumentAttribute, and NSDefaultAttributesDocumentAttribute are supported options key.  When they are not specified, these methods will examine the data and do their best to detect the appropriate attributes.  If dict is non-NULL, it will return a dictionary with various document-wide attributes accessible via NS...DocumentAttribute keys.
-- (BOOL)readFromURL:(NSURL *)url options:(NSDictionary<NSAttributedStringDocumentReadingOptionKey, id> *)opts documentAttributes:(NSDictionary<NSAttributedStringDocumentAttributeKey, id> * _Nullable * _Nullable)dict error:(NSError **)error  API_AVAILABLE(macos(10.5), ios(9.0), watchos(2.0), tvos(9.0));
-- (BOOL)readFromData:(NSData *)data options:(NSDictionary<NSAttributedStringDocumentReadingOptionKey, id> *)opts documentAttributes:(NSDictionary<NSAttributedStringDocumentAttributeKey, id> * _Nullable * _Nullable)dict error:(NSError **)error API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));
-@end
-
-
 /************************ Misc methods ************************/
-@interface NSAttributedString (NSAttributedStringKitAdditions)
+@interface NSAttributedString (NSAttributedStringAppKitAdditions)
 // Attributes which should be copied/pasted with "copy font".
 - (NSDictionary<NSAttributedStringKey, id> *)fontAttributesInRange:(NSRange)range;
 
 // Attributes which should be copied/pasted with "copy ruler".
 - (NSDictionary<NSAttributedStringKey, id> *)rulerAttributesInRange:(NSRange)range;
 
-// Returns YES if the receiver contains a property configured (NSAttachmentAttributeName with NSAttachmentCharacter) in range
-- (BOOL)containsAttachmentsInRange:(NSRange)range API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
-
 // Returns NSNotFound if no line break location found in the specified range; otherwise returns the index of the first character that should go on the NEXT line.
 - (NSUInteger)lineBreakBeforeIndex:(NSUInteger)location withinRange:(NSRange)aRange;
 - (NSUInteger)lineBreakByHyphenatingBeforeIndex:(NSUInteger)location withinRange:(NSRange)aRange;
@@ -281,7 +342,7 @@
 @property(class, readonly, copy) NSArray<NSString *> *textUnfilteredTypes API_AVAILABLE(macos(10.5));
 @end
 
-@interface NSMutableAttributedString (NSMutableAttributedStringKitAdditions)
+@interface NSMutableAttributedString (NSMutableAttributedStringAppKitAdditions)
 - (void)superscriptRange:(NSRange)range;
 - (void)subscriptRange:(NSRange)range;
 - (void)unscriptRange:(NSRange)range;
@@ -335,8 +396,5 @@
 - (BOOL)readFromURL:(NSURL *)url options:(NSDictionary *)options documentAttributes:(NSDictionary* _Nullable * _Nullable)dict API_DEPRECATED("Use -readFromURL:options:documentAttributes:error: instead", macos(10.0,10.11));
 - (BOOL)readFromData:(NSData *)data options:(NSDictionary *)options documentAttributes:(NSDictionary* _Nullable * _Nullable)dict API_DEPRECATED("Use -readFromData:options:documentAttributes:error: instead", macos(10.0,10.11));
 @end
-#endif // !TARGET_OS_IPHONE
 NS_HEADER_AUDIT_END(nullability, sendability)
-#else
-#import <UIFoundation/NSAttributedString.h>
-#endif
+#endif // !TARGET_OS_IPHONE
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSCursor.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSCursor.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSCursor.h	2024-04-25 05:49:37
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSCursor.h	2024-06-01 03:52:53
@@ -7,8 +7,9 @@
 
 #import <Foundation/NSObject.h>
 #import <Foundation/NSGeometry.h>
-#import <AppKit/NSApplication.h>
 #import <AppKit/AppKitDefines.h>
+#import <AppKit/NSApplication.h>
+#import <AppKit/NSDirection.h>
 
 NS_HEADER_AUDIT_BEGIN(nullability, sendability)
 
@@ -20,41 +21,8 @@
 API_AVAILABLE(macos(10.0), ios(13.0))
 @interface NSCursor : NSObject <NSSecureCoding>
 
-/** Returns the application’s current cursor. This is not necessarily the cursor that is currently being displayed on the system. If you need the currently displayed cursor, use `NSCursor.currentSystemCursor`.
-*/
-@property (class, readonly, strong) NSCursor *currentCursor;
+// MARK: - Initializing a New Cursor
 
-/** Returns an `NSCursor` whose image and hot spot match those of the cursor that is currently being displayed on the system, regardless of which application set that cursor.
- 
- For example, this allows an inactive application to examine the image and hot spot of a cursor set by the active application.
- 
- In the case that the current system cursor is hidden, this property is an `NSCursor` whose image matches the cursor you would see if it were visible.
- 
- Only the cursor image and hot spot are replicated in the returned `NSCursor`. Other properties (such as `isSetOnMouseExited` and `isSetOnMouseEntered`) will not necessarily be accurate. The returned instance **cannot** be used for pointer (`==`) or object (`-isEqual:`) equality operations, since a new instance is created lazily on each access of this property.
- 
- This property is `nil` if the currently displayed cursor couldn’t be fetched.
- */
-@property (class, readonly, nullable, strong) NSCursor *currentSystemCursor API_AVAILABLE(macos(10.6));
-
-@property (class, readonly, strong) NSCursor *arrowCursor;
-@property (class, readonly, strong) NSCursor *IBeamCursor;
-@property (class, readonly, strong) NSCursor *pointingHandCursor;
-@property (class, readonly, strong) NSCursor *closedHandCursor;
-@property (class, readonly, strong) NSCursor *openHandCursor;
-@property (class, readonly, strong) NSCursor *resizeLeftCursor;
-@property (class, readonly, strong) NSCursor *resizeRightCursor;
-@property (class, readonly, strong) NSCursor *resizeLeftRightCursor;
-@property (class, readonly, strong) NSCursor *resizeUpCursor;
-@property (class, readonly, strong) NSCursor *resizeDownCursor;
-@property (class, readonly, strong) NSCursor *resizeUpDownCursor;
-@property (class, readonly, strong) NSCursor *crosshairCursor;
-@property (class, readonly, strong) NSCursor *disappearingItemCursor;
-@property (class, readonly, strong) NSCursor *operationNotAllowedCursor API_AVAILABLE(macos(10.5));
-@property (class, readonly, strong) NSCursor *dragLinkCursor API_AVAILABLE(macos(10.6));
-@property (class, readonly, strong) NSCursor *dragCopyCursor API_AVAILABLE(macos(10.6));
-@property (class, readonly, strong) NSCursor *contextualMenuCursor API_AVAILABLE(macos(10.6));
-@property (class, readonly, strong) NSCursor *IBeamCursorForVerticalLayout API_AVAILABLE(macos(10.7));
-
 #if !TARGET_OS_IPHONE
 - (instancetype)initWithImage:(NSImage *)newImage hotSpot:(NSPoint)point NS_DESIGNATED_INITIALIZER;
 #else
@@ -62,10 +30,7 @@
 #endif
 - (instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
 
-+ (void)hide;
-+ (void)unhide;
-+ (void)setHiddenUntilMouseMoves:(BOOL)flag;
-+ (void)pop;
+// MARK: - Setting Cursor Attributes
 
 #if !TARGET_OS_IPHONE
 @property (readonly, strong) NSImage *image;
@@ -74,14 +39,130 @@
 #endif
 @property (readonly) NSPoint hotSpot;
 
-- (void)push;
+// MARK: - Controlling Which Cursor Is Current
+
++ (void)hide;
++ (void)unhide;
++ (void)setHiddenUntilMouseMoves:(BOOL)flag;
++ (void)pop;
 - (void)pop;
+- (void)push;
 - (void)set;
 
+// MARK: - Retrieving Cursor Instances
+
+/// Returns the application’s current cursor.
+/// - Note: This isn’t necessarily the cursor that is currently being displayed, as the system may be showing the cursor for another running application.
+@property (class, readonly, strong) NSCursor *currentCursor;
+
+/// Returns the default cursor, the arrow cursor.
+/// - Discussion: The default cursor, a slanted arrow with its hot spot at the tip. The arrow cursor is the one you’re used to seeing over buttons, scrollers, and many other objects in the window system.
+@property (class, readonly, strong) NSCursor *arrowCursor;
+
+@property (class, readonly, strong) NSCursor *crosshairCursor;
+@property (class, readonly, strong) NSCursor *disappearingItemCursor;
+@property (class, readonly, strong) NSCursor *operationNotAllowedCursor API_AVAILABLE(macos(10.5));
+@property (class, readonly, strong) NSCursor *dragLinkCursor API_AVAILABLE(macos(10.6));
+@property (class, readonly, strong) NSCursor *dragCopyCursor API_AVAILABLE(macos(10.6));
+@property (class, readonly, strong) NSCursor *contextualMenuCursor API_AVAILABLE(macos(10.6));
+
+// MARK: Hand Cursors
+
+@property (class, readonly, strong) NSCursor *pointingHandCursor;
+@property (class, readonly, strong) NSCursor *closedHandCursor;
+@property (class, readonly, strong) NSCursor *openHandCursor;
+
+// MARK: I-Beam Cursors
+
+@property (class, readonly, strong) NSCursor *IBeamCursor;
+@property (class, readonly, strong) NSCursor *IBeamCursorForVerticalLayout API_AVAILABLE(macos(10.7));
+
+// MARK: Zoom Cursors
+
+/// Returns the zoom-in cursor.
+/// - Note: This cursor is used to indicate zooming in on (magnifying) a canvas or object.
+@property (class, readonly, strong) NSCursor *zoomInCursor API_AVAILABLE(macos(15.0));
+
+/// Returns the zoom-out cursor.
+/// - Note: This cursor is used to indicate zooming out of a canvas or object.
+@property (class, readonly, strong) NSCursor *zoomOutCursor API_AVAILABLE(macos(15.0));
+
+// MARK: Column Resize Cursors
+
+/// Returns the cursor for resizing a column (vertical divider) in either direction.
+@property (class, readonly, strong) NSCursor *columnResizeCursor NS_SWIFT_NAME(columnResize) API_AVAILABLE(macos(15.0));
+
+/// Returns the cursor for resizing a column (vertical divider) in the specified directions.
+/// - Parameter directions: The direction in which a column can be resized.
++ (NSCursor *)columnResizeCursorInDirections:(NSHorizontalDirections)directions NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
+// MARK: Row Resize Cursors
+
+/// Returns the cursor for resizing a row (horizontal divider) in either direction.
+@property (class, readonly, strong) NSCursor *rowResizeCursor NS_SWIFT_NAME(rowResize) API_AVAILABLE(macos(15.0));
+
+/// Returns the cursor for resizing a row (horizontal divider) in the specified directions.
+/// - Parameter directions: The direction in which a row can be resized.
++ (NSCursor *)rowResizeCursorInDirections:(NSVerticalDirections)directions NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
+// MARK: Frame Resize Cursors
+
+/// The position along the perimeter of a rectangular frame (its edges and corners) from which it’s resized.
+typedef NS_CLOSED_ENUM(NSUInteger, NSCursorFrameResizePosition) {
+    /// The top edge of the frame.
+    NSCursorFrameResizePositionTop = (1 << 0),
+    /// The left edge of the frame.
+    NSCursorFrameResizePositionLeft = (1 << 1),
+    /// The bottom edge of the frame.
+    NSCursorFrameResizePositionBottom = (1 << 2),
+    /// The right edge of the frame.
+    NSCursorFrameResizePositionRight = (1 << 3),
+    /// The top left corner of the frame.
+    NSCursorFrameResizePositionTopLeft = (NSCursorFrameResizePositionTop | NSCursorFrameResizePositionLeft),
+    /// The top right corner of the frame.
+    NSCursorFrameResizePositionTopRight = (NSCursorFrameResizePositionTop | NSCursorFrameResizePositionRight),
+    /// The bottom left corner of the frame.
+    NSCursorFrameResizePositionBottomLeft = (NSCursorFrameResizePositionBottom | NSCursorFrameResizePositionLeft),
+    /// The bottom right corner of the frame.
+    NSCursorFrameResizePositionBottomRight = (NSCursorFrameResizePositionBottom | NSCursorFrameResizePositionRight),
+} NS_SWIFT_NAME(NSCursor.FrameResizePosition) API_AVAILABLE(macos(15.0));
+
+/// The directions in which a rectangular frame can be resized.
+typedef NS_OPTIONS(NSUInteger, NSCursorFrameResizeDirections) {
+    /// Indicates that the shape can be resized inwards to be smaller.
+    NSCursorFrameResizeDirectionsInward = (1 << 0),
+    /// Indicates that the shape can be resized outwards to be larger.
+    NSCursorFrameResizeDirectionsOutward = (1 << 1),
+    /// Indicates that the shape can be resized inwards or wards to be either smaller or larger, respectively.
+    NSCursorFrameResizeDirectionsAll = (NSCursorFrameResizeDirectionsInward | NSCursorFrameResizeDirectionsOutward),
+} NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
+/// Returns the cursor for resizing a rectangular frame from the specified edge or corner.
+/// - Parameters:
+///   - position: The position along the perimeter of a rectangular frame (its edges and corners) from which it’s resized.
+///   - directions: The directions in which a rectangular frame can be resized.
++ (NSCursor *)frameResizeCursorFromPosition:(NSCursorFrameResizePosition)position inDirections:(NSCursorFrameResizeDirections)directions NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
 @end
 
+// MARK: - Deprecated
+
 APPKIT_API_UNAVAILABLE_BEGIN_MACCATALYST
 static const NSAppKitVersion NSAppKitVersionNumberWithCursorSizeSupport = 682.0;
+API_UNAVAILABLE_END
+
+@interface NSCursor (Deprecated)
+/// This property will always be `nil` in a future version of macOS.
+@property (class, readonly, nullable, strong) NSCursor *currentSystemCursor API_DEPRECATED("No longer recommended. Use ScreenCaptureKit to capture the screen. Use the `showsCursor` property on `SCStreamConfiguration` to control whether or not to include the cursor in the capture. Or, use `NSCursor.currentCursor` if needing to just get the current cursor for this application.", macos(10.6, API_TO_BE_DEPRECATED));
+@property (class, readonly, strong) NSCursor *resizeLeftCursor API_DEPRECATED("Use either `+[NSCursor columnResizeCursorInDirections:]` or `+[NSCursor frameResizeCursorFromPosition:inDirections:]` instead, depending on whether a divider is being re-positioned or a rectangular frame is being resized.", macos(10.0, API_TO_BE_DEPRECATED));
+@property (class, readonly, strong) NSCursor *resizeRightCursor API_DEPRECATED("Use either `+[NSCursor columnResizeCursorInDirections:]` or `+[NSCursor frameResizeCursorFromPosition:inDirections:]` instead, depending on whether a divider is being re-positioned or a rectangular frame is being resized.", macos(10.0, API_TO_BE_DEPRECATED));
+@property (class, readonly, strong) NSCursor *resizeLeftRightCursor API_DEPRECATED("Use either `+[NSCursor columnResizeCursorInDirections:]` or `+[NSCursor frameResizeCursorFromPosition:inDirections:]` instead, depending on whether a divider is being re-positioned or a rectangular frame is being resized.", macos(10.0, API_TO_BE_DEPRECATED));
+@property (class, readonly, strong) NSCursor *resizeUpCursor API_DEPRECATED("Use either `+[NSCursor rowResizeCursorInDirections:]` or `+[NSCursor frameResizeCursorFromPosition:inDirections:]` instead, depending on whether a divider is being re-positioned or a rectangular frame is being resized.", macos(10.0, API_TO_BE_DEPRECATED));
+@property (class, readonly, strong) NSCursor *resizeDownCursor API_DEPRECATED("Use either `+[NSCursor rowResizeCursorInDirections:]` or `+[NSCursor frameResizeCursorFromPosition:inDirections:]` instead, depending on whether a divider is being re-positioned or a rectangular frame is being resized.", macos(10.0, API_TO_BE_DEPRECATED));
+@property (class, readonly, strong) NSCursor *resizeUpDownCursor API_DEPRECATED("Use either `+[NSCursor rowResizeCursorInDirections:]` or `+[NSCursor frameResizeCursorFromPosition:inDirections:]` instead, depending on whether a divider is being re-positioned or a rectangular frame is being resized.", macos(10.0, API_TO_BE_DEPRECATED));
+@end
+
+APPKIT_API_UNAVAILABLE_BEGIN_MACCATALYST
 @interface NSCursor (NSDeprecated)
 - (instancetype)initWithImage:(NSImage *)newImage foregroundColorHint:(nullable NSColor *)fg backgroundColorHint:(nullable NSColor *)bg hotSpot:(NSPoint)hotSpot API_DEPRECATED("Color hints are ignored. Use -initWithImage:hotSpot: instead", macos(10.0,10.12));
 - (void)setOnMouseExited:(BOOL)flag API_DEPRECATED("setOnMouseExited is unused and should not be called", macos(10.0,10.13));
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDirection.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDirection.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDirection.h	1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDirection.h	2024-06-01 03:52:52
@@ -0,0 +1,32 @@
+/*
+ NSDirection.h
+ Application Kit
+ Copyright (c) 2024, Apple Inc.
+ All rights reserved.
+ */
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/// The absolute directions on the horizontal axis.
+typedef NS_OPTIONS(NSUInteger, NSHorizontalDirections) {
+    /// The left direction.
+    NSHorizontalDirectionsLeft = (1 << 0),
+    /// The right direction.
+    NSHorizontalDirectionsRight = (1 << 1),
+    /// All horizontal directions (left and right).
+    NSHorizontalDirectionsAll = (NSHorizontalDirectionsLeft | NSHorizontalDirectionsRight),
+} NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
+/// The directions on the vertical axis.
+typedef NS_OPTIONS(NSUInteger, NSVerticalDirections) {
+    /// The upwards direction.
+    NSVerticalDirectionsUp = (1 << 0),
+    /// The downward direction.
+    NSVerticalDirectionsDown = (1 << 1),
+    /// All vertical directions (up and down).
+    NSVerticalDirectionsAll = (NSVerticalDirectionsUp | NSVerticalDirectionsDown),
+} NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDocument.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDocument.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDocument.h	2024-04-25 05:49:39
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDocument.h	2024-06-01 03:52:55
@@ -1,8 +1,8 @@
 /*
-	NSDocument.h
-	Application Kit
-	Copyright (c) 1997-2023, Apple Inc.
-	All rights reserved.
+    NSDocument.h
+    Application Kit
+    Copyright (c) 1997-2023, Apple Inc.
+    All rights reserved.
 */
 
 #import <AppKit/NSNib.h>
@@ -361,15 +361,15 @@
 
     - (void)document:(NSDocument *)document didSave:(BOOL)didSaveSuccessfully contextInfo:(void *)contextInfo;
 
-The default implementation of this method first makes sure that any editor registered using Cocoa Bindings' NSEditorRegistration protocol has committed its changes, then creates a save panel, adds a standard "file format" accessory view if there is more than one file type for the user to choose from and [self shouldRunSavePanelWithAccessoryView] returns YES, sets various attributes of the panel, invokes [self prepareSavePanel:theSavePanel] to provide an opportunity for customization, then presents the panel. If the user OKs the panel -saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo: is invoked.
+The default implementation of this method first makes sure that any editor registered using Cocoa Bindings' NSEditorRegistration protocol has committed its changes. It then creates a save panel, adds a standard file formats selection control if there is more than one file type for the user to choose from and self.savePanelShowsFileFormatsControl returns YES, sets various attributes of the panel, invokes [self prepareSavePanel:theSavePanel] to provide an opportunity for customization, and presents the panel. If the user OKs the panel -saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo: is invoked.
 
 For backward binary compatibility with Mac OS 10.3 and earlier, the default implementation of this method instead invokes [self saveToFile:nil saveOperation:saveOperation delegate:delegate didSaveSelector:contextInfo:] if -saveToFile:saveOperation:delegate:didSaveSelector:contextInfo: is overridden, even if the user cancels the panel (because that's what 10.3 did).
 */
 - (void)runModalSavePanelForSaveOperation:(NSSaveOperationType)saveOperation delegate:(nullable id)delegate didSaveSelector:(nullable SEL)didSaveSelector contextInfo:(nullable void *)contextInfo;
 
-/* Return YES if -runModalSavePanelForSaveOperation:delegate:didSaveSelector:contextInfo: should add NSDocument's standard file format accessory view to the save panel, NO otherwise. The default implementation of this method returns YES. You can override this method to prevent NSDocument from adding an accessory view to the save panel so that your application can add its own when -prepareSavePanel is invoked.
+/* Return YES if -runModalSavePanelForSaveOperation:delegate:didSaveSelector:contextInfo: should add the standard file formats selection control to the save panel, NO otherwise. The default implementation of this property returns YES.
 */
-@property (readonly) BOOL shouldRunSavePanelWithAccessoryView;
+@property (readonly) BOOL savePanelShowsFileFormatsControl API_AVAILABLE(macos(15.0));
 
 /* Given the save panel that -runModalSavePanelForSaveOperation:delegate:didSaveSelector:contextInfo: is about to present to the user, make any final changes before it is presented, and return YES for success. Return NO for failure, to cancel the save operation. The default implementation of this method just returns YES.
 */
@@ -833,6 +833,10 @@
 @end
 
 @interface NSDocument(NSDeprecated)
+
+/* APIs that will be deprecated in an imminent future release.
+*/
+@property (readonly) BOOL shouldRunSavePanelWithAccessoryView API_DEPRECATED_WITH_REPLACEMENT("savePanelShowsFileFormatsControl", macos(10.0, API_TO_BE_DEPRECATED));
 
 #pragma mark *** Backward Compatibility ***
 
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDocumentController.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDocumentController.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDocumentController.h	2024-04-25 05:49:40
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDocumentController.h	2024-06-01 03:52:56
@@ -1,8 +1,8 @@
 /*
-	NSDocumentController.h
-	Application Kit
-	Copyright (c) 1997-2023, Apple Inc.
-	All rights reserved.
+    NSDocumentController.h
+    Application Kit
+    Copyright (c) 1997-2023, Apple Inc.
+    All rights reserved.
 */
 
 #import <AppKit/NSNibDeclarations.h>
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSGraphicsContext.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSGraphicsContext.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSGraphicsContext.h	2024-04-25 05:49:40
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSGraphicsContext.h	2024-06-01 03:52:56
@@ -42,9 +42,6 @@
 // Instantiates from an appropriate concrete subclass depending on NSGraphicsContextDestinationAttributeName attribute
 + (nullable NSGraphicsContext *)graphicsContextWithAttributes:(NSDictionary<NSGraphicsContextAttributeKey, id> *)attributes;
 
-// Convenience cover method for [NSGraphicsContext graphicsContextWithAttributes:[NSDictionary dictionaryWithObject:<NSWindow instance> forKey:NSGraphicsContextDestinationAttributeName]]
-+ (NSGraphicsContext *)graphicsContextWithWindow:(NSWindow *)window;
-
 /* Convenience cover method for [NSGraphicsContext graphicsContextWithAttributes:[NSDictionary dictionaryWithObject:<NSBitmapImageRep instance> forKey:NSGraphicsContextDestinationAttributeName]]. Only NSBitmapImageRep instances with isPlanar == NO are supported.
 */
 + (nullable NSGraphicsContext *)graphicsContextWithBitmapImageRep:(NSBitmapImageRep *)bitmapRep;
@@ -108,6 +105,8 @@
 
 + (NSGraphicsContext *)graphicsContextWithGraphicsPort:(void *)graphicsPort flipped:(BOOL)initialFlippedState API_DEPRECATED_WITH_REPLACEMENT("graphicsContextWithCGContext:flipped:", macos(10.0,10.14));
 @property (readonly) void *graphicsPort NS_RETURNS_INNER_POINTER API_DEPRECATED_WITH_REPLACEMENT("CGContext", macos(10.0,10.14));
+
++ (NSGraphicsContext *)graphicsContextWithWindow:(NSWindow *)window API_DEPRECATED("Add instances of NSView to display content in a window", macos(10.0,10.14));
 
 @end
 
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenPanel.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenPanel.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenPanel.h	2024-04-25 05:49:37
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenPanel.h	2024-06-01 03:52:52
@@ -50,6 +50,12 @@
 
 @end
 
+@interface NSOpenPanel (InheritedAndUnavailable)
+
+@property BOOL showsContentTypes NS_UNAVAILABLE;
+
+@end
+
 @interface NSOpenPanel (NSDeprecated)
 
 /* Use URLs instead.
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSParagraphStyle.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSParagraphStyle.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSParagraphStyle.h	2024-04-25 05:49:40
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSParagraphStyle.h	2024-06-01 03:52:55
@@ -1,21 +1,26 @@
-#if !__has_include(<UIFoundation/NSParagraphStyle.h>)
+#if (defined(USE_APPKIT_PUBLIC_HEADERS) && USE_APPKIT_PUBLIC_HEADERS) || !__has_include(<UIFoundation/NSParagraphStyle.h>)
+#include <TargetConditionals.h>
+
+#if !TARGET_OS_IPHONE
+#import <AppKit/AppKitDefines.h>
+
 /*
         NSParagraphStyle.h
-        Copyright (c) 1994-2023, Apple Inc.  All rights reserved.
+        Copyright (c) 1994-2024, Apple Inc.  All rights reserved.
  
 	NSParagraphStyle and NSMutableParagraphStyle hold paragraph style information
 	NSTextTab holds information about a single tab stop
  */
 
-#import <Foundation/NSObject.h>
+#import <Foundation/Foundation.h>
 #import <AppKit/NSText.h>
 
-@class NSTextBlock;
 @class NSTextList;
 
 NS_HEADER_AUDIT_BEGIN(nullability, sendability)
 
-#if !TARGET_OS_IPHONE
+#if !__NSPARAGRAPH_STYLE_SHARED_SECTION__
+#define __NSPARAGRAPH_STYLE_SHARED_SECTION__ 1
 
 typedef NS_ENUM(NSUInteger, NSLineBreakMode) {
     NSLineBreakByWordWrapping = 0,         // Wrap at word boundaries, default
@@ -24,7 +29,7 @@
     NSLineBreakByTruncatingHead,    // Truncate at head of line: "...wxyz"
     NSLineBreakByTruncatingTail,    // Truncate at tail of line: "abcd..."
     NSLineBreakByTruncatingMiddle    // Truncate middle of line:  "ab...yz"
-} API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));
+} API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0), visionos(1.0));
 
 // Line break strategy describes a collection of options that can affect where line breaks are placed in a paragraph.
 // This is independent from line break mode, which describes what happens when text is too long to fit within its container.
@@ -35,41 +40,39 @@
     // Use the push out line break strategy.
     // This strategy allows the text system to "push out" individual lines by some number of words to avoid an orphan word on the last line of the paragraph.
     // The current implementation usually pushes out the last line by a single word.
-    NSLineBreakStrategyPushOut API_AVAILABLE(macos(10.11), ios(9.0)) = 1 << 0,
+    NSLineBreakStrategyPushOut API_AVAILABLE(macos(10.11), ios(9.0), tvos(9.0), watchos(2.0), visionos(1.0)) = 1 << 0,
     // When specified, it prohibits breaking between Hangul characters. It is the preferable typesetting strategy for the modern Korean documents suitable for UI strings.
-    NSLineBreakStrategyHangulWordPriority API_AVAILABLE(macos(11.0), ios(14.0)) = 1 << 1,
+    NSLineBreakStrategyHangulWordPriority API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0), visionos(1.0)) = 1 << 1,
     // Use the same configuration of line break strategies that the system uses for standard UI labels. This set of line break strategies is optimized for displaying shorter strings that are common in UI labels and may not be suitable for large amounts of text.
-    NSLineBreakStrategyStandard API_AVAILABLE(macos(11.0), ios(14.0)) = 0xFFFF
-};
+    NSLineBreakStrategyStandard API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0), visionos(1.0)) = 0xFFFF
+} API_AVAILABLE(macos(10.11), ios(9.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
+#endif // !__NSPARAGRAPH_STYLE_SHARED_SECTION__
+
 // NSTextTab
-typedef NSString * NSTextTabOptionKey NS_TYPED_ENUM;
-APPKIT_EXTERN NSTextTabOptionKey  NSTabColumnTerminatorsAttributeName API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0)); // An attribute for NSTextTab options.  The value is NSCharacterSet.  The character set is used to determine the tab column terminating character.  The tab and newline characters are implied even if not included in the character set.
+typedef NSString * NSTextTabOptionKey NS_TYPED_ENUM API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSTextTabOptionKey NSTabColumnTerminatorsAttributeName API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0)); // An attribute for NSTextTab options.  The value is NSCharacterSet.  The character set is used to determine the tab column terminating character.  The tab and newline characters are implied even if not included in the character set.
 
-API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0)) @interface NSTextTab : NSObject <NSCopying, NSCoding, NSSecureCoding>
+APPKIT_EXTERN API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0))
+@interface NSTextTab : NSObject <NSCopying, NSCoding, NSSecureCoding>
 
-+ (NSCharacterSet *)columnTerminatorsForLocale:(nullable NSLocale *)aLocale API_AVAILABLE(macos(10.11), ios(7.0), watchos(2.0), tvos(9.0)); // Returns the column terminators for locale. Passing nil returns an instance corresponding to +[NSLocale systemLocale]. For matching user's formatting preferences, pass +[NSLocale currentLocale]. Can be used as the value for NSTabColumnTerminatorsAttributeName to make a decimal tab stop.
++ (NSCharacterSet *)columnTerminatorsForLocale:(nullable NSLocale *)aLocale API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0)); // Returns the column terminators for locale. Passing nil returns an instance corresponding to +[NSLocale systemLocale]. For matching user's formatting preferences, pass +[NSLocale currentLocale]. Can be used as the value for NSTabColumnTerminatorsAttributeName to make a decimal tab stop.
 
-- (instancetype)initWithTextAlignment:(NSTextAlignment)alignment location:(CGFloat)loc options:(NSDictionary<NSTextTabOptionKey, id> *)options NS_DESIGNATED_INITIALIZER; // Initializes a text tab with the text alignment, location, and options.  The text alignment is used to determine the position of text inside the tab column.
-
-
-@property (readonly) NSTextAlignment alignment;  // Defines the alignment of tab column contents. NSTextAlignmentNatural and NSTextAlignmentJustified are resolved either NSTextAlignmentLeft or NSTextAlignmentRight based on the user's preferred language.
 @property (readonly) CGFloat location; // Location of the tab stop inside the line fragment rect coordinate system
 @property (readonly) NSDictionary<NSTextTabOptionKey, id> *options; // Optional configuration attributes
 @end
 
 
 // NSParagraphStyle
+APPKIT_EXTERN API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0))
+@interface NSParagraphStyle : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
 
-API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0)) @interface NSParagraphStyle : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
-
 @property (class, readonly, copy) NSParagraphStyle *defaultParagraphStyle; // This class property returns a shared and cached NSParagraphStyle instance with the default style settings, with same value as the result of [[NSParagraphStyle alloc] init].
 
 + (NSWritingDirection)defaultWritingDirectionForLanguage:(nullable NSString *)languageName;  // languageName is in ISO lang region format
 
 @property (readonly) CGFloat lineSpacing; // "Leading": distance between the bottom of one line fragment and top of next (applied between lines in the same container). This value is included in the line fragment heights in layout manager.
 @property (readonly) CGFloat paragraphSpacing; // Distance between the bottom of this paragraph and top of next (or the beginning of its paragraphSpacingBefore, if any).
-@property (readonly) NSTextAlignment alignment;
 
 // The following values are relative to the appropriate margin (depending on the paragraph direction)
 
@@ -91,32 +94,25 @@
 @property (readonly) float hyphenationFactor;
 
 // A property controlling the hyphenation behavior for the paragraph associated with the paragraph style. The exact hyphenation logic is dynamically determined by the layout context such as language, platform, etc. When YES, it affects the return value from -hyphenationFactor when the property is set to 0.0.
-@property (readonly) BOOL usesDefaultHyphenation API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0));
+@property (readonly) BOOL usesDefaultHyphenation API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0), visionos(1.0));
 
-@property (readonly,copy) NSArray<NSTextTab *> *tabStops API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0)); // An array of NSTextTabs. Contents should be ordered by location. The default value is an array of 12 left-aligned tabs at 28pt interval
-@property (readonly) CGFloat defaultTabInterval API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0)); // The default tab interval used for locations beyond the last element in tabStops
+@property (readonly,copy) NSArray<NSTextTab *> *tabStops API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0)); // An array of NSTextTabs. Contents should be ordered by location. The default value is an array of 12 left-aligned tabs at 28pt interval
+@property (readonly) CGFloat defaultTabInterval API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0)); // The default tab interval used for locations beyond the last element in tabStops
 
-@property (readonly) BOOL allowsDefaultTighteningForTruncation API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)); // Tightens inter-character spacing in attempt to fit lines wider than the available space if the line break mode is one of the truncation modes before starting to truncate. YES by default for apps linked against 10.11 and later SDK. The maximum amount of tightening performed is determined by the system based on contexts such as font, line width, etc.
+@property (readonly, copy) NSArray<NSTextList *> *textLists API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));     // Array to specify the text lists containing the paragraph, nested from outermost to innermost.
 
-// Specifies the threshold for using tightening as an alternative to truncation when -allowsDefaultTighteningForTruncation=NO.  When the line break mode specifies truncation, the text system will attempt to tighten inter-character spacing as an alternative to truncation, provided that the ratio of the text width to the line fragment width does not exceed 1.0 + tighteningFactorForTruncation.  Otherwise the text will be truncated at a location determined by the line break mode.  The default value is 0.0 for apps linked against 10.11 and later SDK. This property is ignored when -allowsDefaultTighteningForTruncation=YES. Explicitly setting this property to 0.0 has a side effect of also setting -allowsDefaultTighteningForTruncation to NO.
-@property (readonly) float tighteningFactorForTruncation;
+@property (readonly) BOOL allowsDefaultTighteningForTruncation API_AVAILABLE(macos(10.11), ios(9.0), tvos(9.0), watchos(2.0), visionos(1.0)); // Tightens inter-character spacing in attempt to fit lines wider than the available space if the line break mode is one of the truncation modes before starting to truncate. NO by default. The maximum amount of tightening performed is determined by the system based on contexts such as font, line width, etc.
 
-@property (readonly, copy) NSArray<__kindof NSTextBlock *> *textBlocks;    // Array to specify the text blocks containing the paragraph, nested from outermost to innermost.
-@property (readonly, copy) NSArray<NSTextList *> *textLists;     // Array to specify the text lists containing the paragraph, nested from outermost to innermost.
+@property (readonly) NSLineBreakStrategy lineBreakStrategy API_AVAILABLE(macos(10.11), ios(9.0), tvos(9.0), watchos(2.0), visionos(1.0)); // Specifies the line break strategies that may be used for laying out the paragraph.  The default value is NSLineBreakStrategyNone.
 
-// Specifies whether the paragraph is to be treated as a header for purposes of HTML generation.  Should be set to 0 (the default value) if the paragraph is not a header, or from 1 through 6 if the paragraph is to be treated as a header.
-@property (readonly) NSInteger headerLevel;
-
-// Specifies the line break strategies that may be used for laying out the paragraph.  The default value is NSLineBreakStrategyNone.
-@property (readonly) NSLineBreakStrategy lineBreakStrategy API_AVAILABLE(macos(10.11), ios(9.0));
 @end
 
 
-API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0)) @interface NSMutableParagraphStyle : NSParagraphStyle
+APPKIT_EXTERN API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0))
+@interface NSMutableParagraphStyle : NSParagraphStyle
 
 @property CGFloat lineSpacing;
 @property CGFloat paragraphSpacing;
-@property NSTextAlignment alignment;
 @property CGFloat firstLineHeadIndent;
 @property CGFloat headIndent;
 @property CGFloat tailIndent;
@@ -127,21 +123,61 @@
 @property CGFloat lineHeightMultiple;
 @property CGFloat paragraphSpacingBefore;
 @property float hyphenationFactor;
-@property (readwrite) BOOL usesDefaultHyphenation API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0));
-@property (null_resettable, copy) NSArray<NSTextTab *> *tabStops API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));
-@property CGFloat defaultTabInterval API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));
-@property BOOL allowsDefaultTighteningForTruncation API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
+@property (readwrite) BOOL usesDefaultHyphenation API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0), visionos(1.0));
+@property (null_resettable, copy) NSArray<NSTextTab *> *tabStops API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+@property CGFloat defaultTabInterval API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+@property BOOL allowsDefaultTighteningForTruncation API_AVAILABLE(macos(10.11), ios(9.0), tvos(9.0), watchos(2.0), visionos(1.0));
+@property NSLineBreakStrategy lineBreakStrategy API_AVAILABLE(macos(10.11), ios(9.0), tvos(9.0), watchos(2.0), visionos(1.0));
+@property (NS_NONATOMIC_IOSONLY, copy) NSArray<NSTextList *> *textLists API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
-- (void)addTabStop:(NSTextTab *)anObject API_AVAILABLE(macos(10.0), ios(9.0), watchos(2.0), tvos(9.0));
-- (void)removeTabStop:(NSTextTab *)anObject API_AVAILABLE(macos(10.0), ios(9.0), watchos(2.0), tvos(9.0));
+- (void)addTabStop:(NSTextTab *)anObject API_AVAILABLE(macos(10.0), ios(9.0), tvos(9.0), watchos(2.0), visionos(1.0));
+- (void)removeTabStop:(NSTextTab *)anObject API_AVAILABLE(macos(10.0), ios(9.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
-- (void)setParagraphStyle:(NSParagraphStyle *)obj API_AVAILABLE(macos(10.0), ios(9.0), watchos(2.0), tvos(9.0));
+- (void)setParagraphStyle:(NSParagraphStyle *)obj API_AVAILABLE(macos(10.0), ios(9.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
+@end
+
+NS_HEADER_AUDIT_END(nullability, sendability)
+#endif // !TARGET_OS_IPHONE
+#else
+#import <UIFoundation/NSParagraphStyle.h>
+#endif
+
+#import <Foundation/Foundation.h>
+#import <AppKit/AppKitDefines.h>
+#import <AppKit/NSText.h>
+
+@class NSTextList;
+@class NSTextBlock;
+
+#if !TARGET_OS_IPHONE
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0), visionos(1.0)) @interface NSTextTab ()
+
+- (instancetype)initWithTextAlignment:(NSTextAlignment)alignment location:(CGFloat)loc options:(NSDictionary<NSTextTabOptionKey, id> *)options NS_DESIGNATED_INITIALIZER; // Initializes a text tab with the text alignment, location, and options.  The text alignment is used to determine the position of text inside the tab column.
+@property (readonly) NSTextAlignment alignment;  // Defines the alignment of tab column contents. NSTextAlignmentNatural and NSTextAlignmentJustified are resolved either NSTextAlignmentLeft or NSTextAlignmentRight based on the user's preferred language.
+
+@end
+
+API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0), visionos(1.0)) @interface NSParagraphStyle ()
+@property (readonly) NSTextAlignment alignment;
+
+// Specifies the threshold for using tightening as an alternative to truncation when -allowsDefaultTighteningForTruncation=NO.  When the line break mode specifies truncation, the text system will attempt to tighten inter-character spacing as an alternative to truncation, provided that the ratio of the text width to the line fragment width does not exceed 1.0 + tighteningFactorForTruncation.  Otherwise the text will be truncated at a location determined by the line break mode.  The default value is 0.0 for apps linked against 10.11 and later SDK. This property is ignored when -allowsDefaultTighteningForTruncation=YES. Explicitly setting this property to 0.0 has a side effect of also setting -allowsDefaultTighteningForTruncation to NO.
+@property (readonly) float tighteningFactorForTruncation;
+
+@property (readonly, copy) NSArray<__kindof NSTextBlock *> *textBlocks;    // Array to specify the text blocks containing the paragraph, nested from outermost to innermost.
+
+// Specifies whether the paragraph is to be treated as a header for purposes of HTML generation.  Should be set to 0 (the default value) if the paragraph is not a header, or from 1 through 6 if the paragraph is to be treated as a header.
+@property (readonly) NSInteger headerLevel;
+
+@end
+
+API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0), visionos(1.0)) @interface NSMutableParagraphStyle ()
+@property NSTextAlignment alignment;
 @property float tighteningFactorForTruncation;
 @property (copy) NSArray<__kindof NSTextBlock *> *textBlocks;
-@property (copy) NSArray<NSTextList *> *textLists;
 @property NSInteger headerLevel;
-@property NSLineBreakStrategy lineBreakStrategy API_AVAILABLE(macos(10.11), ios(9.0));
 @end
 
 /************************ Deprecated ************************/
@@ -160,10 +196,5 @@
 
 
 
-#endif // !TARGET_OS_IPHONE
-
 NS_HEADER_AUDIT_END(nullability, sendability)
-#else
-#import <UIFoundation/NSParagraphStyle.h>
-#endif
-
+#endif // !TARGET_OS_IPHONE
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPersistentDocument.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPersistentDocument.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPersistentDocument.h	2024-04-25 05:49:41
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPersistentDocument.h	2024-06-01 03:52:56
@@ -1,8 +1,8 @@
 /*
-	NSPersistentDocument.h
-	Application Kit
-	Copyright (c) 2004-2023, Apple Inc.
-	All rights reserved.
+    NSPersistentDocument.h
+    Application Kit
+    Copyright (c) 2004-2023, Apple Inc.
+    All rights reserved.
  */
 
 
@@ -47,5 +47,3 @@
 
 API_UNAVAILABLE_END
 NS_HEADER_AUDIT_END(nullability, sendability)
-
-
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPopUpButton.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPopUpButton.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPopUpButton.h	2024-04-25 05:49:31
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPopUpButton.h	2024-06-01 03:52:56
@@ -7,7 +7,7 @@
 
 #import <Foundation/NSArray.h>
 #import <AppKit/NSButton.h>
-#import <AppKit/NSMenuItemCell.h>
+#import <AppKit/NSPopUpButtonCell.h>
 #import <AppKit/NSMenuItem.h>
 #import <AppKit/AppKitDefines.h>
 
@@ -18,20 +18,68 @@
 
 @interface NSPopUpButton : NSButton
 
+/*!
+ Creates a standard pop-up button with a menu, target, and action.
+ @param menu A menu presented by the pop-up button, containing items that the user can choose between.
+ @param target The target object that receives action messages from the control.
+ @param action The action message sent by the control.
+ @discussion If `menu` is non-empty, the pop-up button uses the first item for its initial selection.
+ @return An initialized pop-up button object.
+ */
++ (instancetype)popUpButtonWithMenu:(NSMenu *)menu target:(nullable id)target action:(nullable SEL)action NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
+/*!
+ Creates a standard pull-down button with a title and menu.
+ @param title The localized title string that is displayed on the button.
+ @param menu The pull-down menu to present when interacting with the button.
+ @discussion Pull-down buttons created using this method have the `usesItemFromMenu` property set to `NO`.
+ @return An initialized pull-down button object.
+ */
++ (instancetype)pullDownButtonWithTitle:(NSString *)title menu:(NSMenu *)menu NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
+/*!
+ Creates a standard pull-down button with an image and menu.
+ @param image The icon that is displayed on the button.
+ @param menu The pull-down menu to present when interacting with the button.
+ @discussion Pull-down buttons created using this method have the `usesItemFromMenu` property set to `NO`.
+ @return An initialized pull-down button object.
+ */
++ (instancetype)pullDownButtonWithImage:(NSImage *)image menu:(NSMenu *)menu NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
+/*!
+ Creates a standard pull-down button with a title, image, and menu.
+ @param title The localized title string that is displayed on the button.
+ @param image The icon that is displayed on the button.
+ @param menu The pull-down menu to present when interacting with the button.
+ @discussion Pull-down buttons created using this method have the `usesItemFromMenu` property set to `NO`.
+ @return An initialized pull-down button object.
+ */
++ (instancetype)pullDownButtonWithTitle:(NSString *)title image:(NSImage *)image menu:(NSMenu *)menu NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(15.0));
+
 - (instancetype)initWithFrame:(NSRect)buttonFrame pullsDown:(BOOL)flag;
 
-// Overrides behavior of NSView.  This is the menu for the popup, not a context menu.  PopUpButtons do not have context menus.
+#pragma mark Configuration
+
+/*! The menu that is presented by the popup button. This overrides the inherited NSView property and replaces NSView's standard context menu behavior. */
 @property (nullable, strong) NSMenu *menu;
 
-// Behavior settings
+/*! When the value of this property is `YES` the button adopts 'pull-down' behavior, displaying static button contents and presenting its menu at the edge of the button. When the value of this property is `NO` the button behaves as a popup, displaying the currently-selected menu item and presenting its menu above the button, positioning the selected menu item to match the button's contents. */
 @property BOOL pullsDown;
-    
+
+/*! When the value of this property is `YES`, the popup button automatically enables and disables its menu items according to the `NSMenuValidation` protocol prior to user interaction. */
 @property BOOL autoenablesItems;
 
+/*! For pull-down buttons and for popups under severe screen position restrictions, this property specifies the edge of the control that the menu should present from. */
 @property NSRectEdge preferredEdge;
-    // The preferred edge is used for pull down menus and for popups under severe screen position restrictions.  It indicates what edge of the cell the menu should pop out from.
 
-// Adding and removing items
+/*! When `usesItemFromMenu` is `YES`, a pull-down button uses the title of the first menu item and hides the first menu item. A pop-up button uses the title of the currently selected menu. The default value is `YES`. */
+@property BOOL usesItemFromMenu API_AVAILABLE(macos(15.0));
+
+/*! When the value of this property is `YES`, the selected menu item's `state` is set to `NSControlStateValueOn`. When the value of this property is `NO`, the menu item's `state` is not changed. When this property changes, the `state` of the currently selected item is updated appropriately. This property is ignored for pull-down buttons. */
+@property BOOL altersStateOfSelectedItem API_AVAILABLE(macos(15.0));
+
+#pragma mark Adding and Removing Items
+
 - (void)addItemWithTitle:(NSString *)title;
 - (void)addItemsWithTitles:(NSArray<NSString *> *)itemTitles;
 - (void)insertItemWithTitle:(NSString *)title atIndex:(NSInteger)index;
@@ -40,8 +88,8 @@
 - (void)removeItemAtIndex:(NSInteger)index;
 - (void)removeAllItems;
 
+#pragma mark Accessing Items
 
-// Accessing the items
 @property (readonly, copy) NSArray<NSMenuItem *> *itemArray;
 @property (readonly) NSInteger numberOfItems;
 
@@ -55,8 +103,8 @@
 - (nullable NSMenuItem *)itemWithTitle:(NSString *)title;
 @property (nullable, readonly, strong) NSMenuItem *lastItem;
 
+#pragma mark Selecting Items
 
-// Dealing with selection
 - (void)selectItem:(nullable NSMenuItem *)item;
 - (void)selectItemAtIndex:(NSInteger)index;
 - (void)selectItemWithTitle:(NSString *)title;
@@ -68,14 +116,14 @@
 @property (readonly) NSInteger selectedTag;
 - (void)synchronizeTitleAndSelectedItem;
 
-// Title conveniences
+#pragma mark Item Title Conveniences
+
 - (NSString *)itemTitleAtIndex:(NSInteger)index;
 @property (readonly, copy) NSArray<NSString *> *itemTitles;
 @property (nullable, readonly, copy) NSString *titleOfSelectedItem;
 
 @end
 
-/* Notifications */
 APPKIT_EXTERN NSNotificationName NSPopUpButtonWillPopUpNotification;
 
 API_UNAVAILABLE_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h	2024-04-25 05:49:36
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h	2024-06-01 03:52:51
@@ -17,7 +17,7 @@
 @protocol NSOpenSavePanelDelegate;
 @class UTType;
 
-/* Return codes from the open/save panel.
+/** Return codes from the open/save panel.
 */
 enum {
     NSFileHandlingPanelCancelButton API_DEPRECATED_WITH_REPLACEMENT("NSModalResponseCancel", macos(10.0,10.13)) = NSModalResponseCancel,
@@ -25,175 +25,245 @@
 };
 
 @interface NSSavePanel : NSPanel
+/**
+ A note on when properties can be set.
+ Both the NSSavePanel and NSOpenPanel have two phases — configuration and running.
+ The configuration phase is when the panel is not displayed. The running phase is when the panel is displayed — i.e. after `-beginSheetModalForWindow:completionHandler:`, `-beginWithCompletionHandler:`, `-runModal`. When a panel is dismissed, the panel reverts back to the configuration phase and can be reused.
+ Some properties can only be set during the configuration phase. Those properties may be changed by the panel during the run phase. Unless otherwise mentioned a property can be changed any time.
+ */
 
-/* Creates a new instance of the NSSavePanel. This class is not a singleton. 
-*/
+/**
+ Creates a new instance of the NSSavePanel. This class is not a singleton.
+ */
 + (NSSavePanel *)savePanel;
 
-#pragma mark -
-#pragma mark Result Properties
+// MARK: - Result Properties
 
-/* NSSavePanel: Returns the URL to save the file at. A file may already exist at 'URL' if the user choose to overwrite it.
-   NSOpenPanel: Returns the single filename selected by the user. Note: if -allowsMultipleSelection is set, you should use the -URLs on NSOpenPanel instead.
-*/
+/**
+ `NSSavePanel`: Returns the URL to save the file at. A file may already exist at `url` if the user choose to overwrite it.
+ `NSOpenPanel`: Returns the single filename selected by the user. Note: if -allowsMultipleSelection is set, you should use the -URLs on NSOpenPanel instead.
+ */
 @property (nullable, readonly, copy) NSURL *URL;
 
-#pragma mark -
-#pragma mark Configuration Properties
+// MARK: - Configuration Properties
 
-/* Gets and sets the identifier.
-    The panel's current state such as the root directory and the current directory are saved and restored relative to the identifier.
-    Note: When the identifier is changed, the properties that depend on the identifier are updated from user defaults. Properties that have a null default value are not changed (and keep their existing value).
-*/
+/**
+ Sets and returns the identifier.
+
+ The panel's current state such as the root directory and the current directory are saved and restored relative to the identifier.
+ - Note: When the identifier is changed, the properties that depend on the identifier are updated from user defaults. Properties that have a null value in user defaults are not changed (and keep their existing value).
+ - Note: Can only be set during the configuration phase.
+ */
 @property (nullable, copy) NSUserInterfaceItemIdentifier identifier;
 
-/* NSSavePanel/NSOpenPanel: Gets and sets the directoryURL shown. A value of nil indicates that the last directory shown to the user will be used. This method will not block to resolve the URL, and the directory will asyncronously be set, if required.
-*/
+/**
+ `NSSavePanel`/`NSOpenPanel`: Sets and returns the directory that is displayed. Set to `nil` to display the default directory. This method will not block to resolve the URL, and the directory will asyncronously be set, if required.
+ - Note: Can only be set during the configuration phase.
+ */
 @property (nullable, copy) NSURL *directoryURL API_AVAILABLE(macos(10.6));
 
-/*
-    NSSavePanel: An array of UTTypes specifying the file types the user can save the file as. An empty value indicates that any file type can be used. If no extension is given by the user, the first preferred extension from the array will be used as the extension for the save panel. If the user specifies a type not in the array, and 'allowsOtherFileTypes' is YES, they will be presented with another dialog when prompted to save. The default value is the empty array.
-    NSOpenPanel: This property determines which files should be enabled in the open panel. Using the deprecated methods to show the open panel (the ones that take a "types:" parameter) will overwrite this value, and should not be used. The allowedContentTypes can be changed while the panel is running (ie: from an accessory view). This is also known as the "enabled file types". An empty value indicates that all files should be enabled.
-*/
+/**
+ `NSSavePanel`: An array of UTTypes specifying the file types the user can save the file as. Set to `@[]` to specify that any file type can be used. If no extension is given by the user, the first preferred extension from the array will be used as the extension for the save panel. If the user specifies a type not in the array, and `allowsOtherFileTypes` is `YES`, they will be presented with another dialog when prompted to save. The default value is the empty array.
+ `NSOpenPanel`: This property determines which files should be enabled in the open panel. Using the deprecated methods to show the open panel (the ones that take a "types:" parameter) will overwrite this value, and should not be used. `allowedContentTypes` can be changed while the panel is running (ie: from an accessory view). This is also known as the "enabled file types". Set to `@[]` to specify that all files should be enabled.
+ */
 @property (copy) NSArray<UTType *> *allowedContentTypes API_AVAILABLE(macos(11.0));
 
-/*  NSSavePanel: Returns a BOOL value that indicates whether the receiver allows the user to save files with an extension that's not in the list of 'allowedFileTypes'.
-    NSOpenPanel: Not used.
-*/
+/**
+ `NSSavePanel`: Returns a BOOL value that indicates whether the panel allows the user to save files with an extension that is not in the list of `allowedFileTypes`.
+ `NSOpenPanel`: Not used.
+ */
 @property BOOL allowsOtherFileTypes;
 
-/* Gets and sets the accessory view shown in the panel. For applications that link on SnowLeopard and higher, the accessoryView's frame will be observed, and any changes the programmer makes to the frame will automatically be reflected in the panel (including animated changes to the frame height).
-*/
+/**
+ `NSSavePanel`:The current type. If set to `nil`, resets to the first allowed content type. Returns `nil` if `allowedContentTypes` is empty.
+ `NSOpenPanel`: Not used.
+ - Note: Asserts that `currentContentType` conforms to `UTTypeData` or `UTTypeDirectory`.
+ */
+@property (nullable, copy) UTType *currentContentType API_AVAILABLE(macos(15.0));
+
+/**
+ Sets and returns the accessory view shown in the panel. For applications that link on SnowLeopard and higher, the accessoryView's frame will be observed, and any changes the programmer makes to the frame will automatically be reflected in the panel (including animated changes to the frame height).
+ */
 @property (nullable, strong) NSView *accessoryView;
 
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wincompatible-property-type"
 
-/* Gets and sets the delegate.
-*/
+/**
+ `NSSavePanel`/`NSOpenPanel`: Sets and returns the delegate.
+ */
 @property (nullable, weak) id<NSOpenSavePanelDelegate> delegate;
 
 #pragma clang diagnostic pop
 
-
-/*  NSSavePanel: Returns YES if the panel is expanded. Defaults to NO, and persists in the user defaults.
-    NSOpenPanel: Not used.
-*/
+/**
+ `NSSavePanel`: Returns `YES` if the panel is expanded. Defaults to `NO`. Persists in the user defaults.
+ - Note: Can only be set during the configuration phase.
+ `NSOpenPanel`: Not used.
+ */
 @property (getter=isExpanded, readonly) BOOL expanded;
 
-/*  NSSavePanel/NSOpenPanel: Set to YES to allow the "New Folder" button to be shown.
-*/
+/**
+ `NSSavePanel`/`NSOpenPanel`: Set to `YES` to show the "New Folder" button. Default is `YES`.
+ */
 @property BOOL canCreateDirectories;
 
-/*  NSSavePanel: Set to YES to show the extension-hiding checkbox.
-    NSOpenPanel: Should not be used.
-*/
+/**
+ `NSSavePanel`: Set to `YES` to show the "Hide Extension" menu item.
+ `NSOpenPanel`: Not used.
+ */
 @property BOOL canSelectHiddenExtension;
 
-/*  NSSavePanel: Set to YES if the extension-hiding checkbox should be checked.
-    NSOpenPanel: Should not be used.
+/**
+ `NSSavePanel`: Set to `YES` if the filename extension should be hidden. Otherwise, `NO` if the filename extension should be shown. Default is `YES`.
+ - Note: Can only be set during the configuration phase.
+ `NSOpenPanel`: Not used.
 */
 @property (getter=isExtensionHidden) BOOL extensionHidden;
 
-/* NSSavePanel/NSOpenPanel: If set to YES, the user can open into file packages, as though they were directories.
-*/
+/**
+ `NSSavePanel`/`NSOpenPanel`: If set to `YES`, the user can navigate into file packages as if they were directories. Default is `NO`.
+ */
 @property BOOL treatsFilePackagesAsDirectories;
 
-/* NSSavePanel/NSOpenPanel: Sets the text shown on the Open or Save button. If set to an empty string, it will show a localized "Open" for the NSOpenPanel and "Save" for the NSSavePanel. The default value will be the correct localized prompt for the open or save panel, as appropriate.
-*/
+/**
+ `NSSavePanel`/`NSOpenPanel`: Sets the text shown on the Open or Save button. If set to an empty string, it will show a localized "Open" for the NSOpenPanel and "Save" for the NSSavePanel. The default value will be the correct localized prompt for the open or save panel, as appropriate.
+ */
 @property (null_resettable, copy) NSString *prompt;
 
-/* NSSavePanel/NSOpenPanel: Gets and sets the title for the panel shown at the top of the window.
-*/
+/**
+ `NSSavePanel`/`NSOpenPanel`: Sets and returns the title for the panel shown at the top of the window.
+ - Note: The open and save panel does not currently have a titlebar. So the title is not displayed.
+ */
 @property (null_resettable, copy) NSString *title;
 
-/*  NSSavePanel: Gets and sets the text shown to the left of the "name field". Default value is a localized "Save As:" string.
-    NSOpenPanel: Not used.
+/**
+ `NSSavePanel`: Sets and returns the text shown to the left of the "name field". Default value is a localized "Save As:" string.
+ `NSOpenPanel`: Not used.
 */
 @property (null_resettable, copy) NSString *nameFieldLabel;
 
-/*  NSSavePanel: Gets and sets the user-editable file name shown in the name field. 'value' must not be nil. NOTE: calling the deprecated methods that take a "name:" parameter will overwrite any values set before the panel was shown. Note that 'value' may have the file extension stripped, if [panel isExtensionHidden] is set to YES.
-    NSOpenPanel: Not used.
+/**
+ `NSSavePanel`: Sets and returns the user-editable file name shown in the name field.
+ - Note: Calling the deprecated methods that take a "name:" parameter will overwrite any values set before the panel is shown.
+ - Note: If `[panel isExtensionHidden]` is set to `YES`, the extension will be hidden.
+ - Note: Can only be set during the configuration phase.
+ `NSOpenPanel`: Not used.
 */
 @property (copy) NSString *nameFieldStringValue API_AVAILABLE(macos(10.6));
 
-/*  NSSavePanel/NSOpenPanel: Gets and sets the message shown under title of the panel. 'message' must not be nil.
-*/
+/**
+ `NSSavePanel`/`NSOpenPanel`: Sets and returns the message shown under title of the panel.
+ */
 @property (null_resettable, copy) NSString *message;
 
-- (void)validateVisibleColumns;
-
-/* NSSavePanel/NSOpenPanel: If showsHiddenFiles is set to YES, files that are normally hidden from the user are displayed. This method was published in Mac OS 10.6, but has existed since Mac OS 10.4. This property is KVO compliant. The user may invoke the keyboard shortcut (cmd-shift-.) to show or hide hidden files. Any user interface shown in an an accessory view should be updated by using key value observing (KVO) to watch for changes of this property. Alternatively, the user interface can be directly bound to this property. The default value is NO.
-*/
+/**
+ `NSSavePanel`/`NSOpenPanel`: If `showsHiddenFiles` is set to `YES`, files that are normally hidden from the user are displayed. This method was published in Mac OS 10.6, but has existed since Mac OS 10.4. This property is KVO compliant. The user may invoke the keyboard shortcut (cmd-shift-.) to show or hide hidden files. Any user interface shown in an an accessory view should be updated by using key value observing (KVO) to watch for changes of this property. Alternatively, the user interface can be directly bound to this property. The default value is `NO`.
+ */
 @property BOOL showsHiddenFiles;
 
-/*  NSSavePanel: Shows or hides the "Tags" field in the receiver. By passing YES, you become responsible for setting Tag names on the resulting file after saving is complete.
-    NSOpenPanel: Should not be used.
+/**
+ `NSSavePanel`: Shows or hides the "Tags" field in the receiver. By passing `YES`, you become responsible for setting Tag names on the resulting file after saving is complete. Default is `YES`.
+ `NSOpenPanel`: Not used.
 */
 @property BOOL showsTagField API_AVAILABLE(macos(10.9));
 
-/*  NSSavePanel: When -showsTagField returns YES, set any initial Tag names to be displayed, if necessary, prior to displaying the receiver. Also, if the user clicks "Save", take the result of -tagNames, and set them on the resulting file after saving is complete. Tag names are NSStrings, arrays of which can be used directly with the NSURLTagNamesKey API for getting and setting tags on files. Passing nil or an empty array to -setTagNames: will result in no initial Tag names appearing in the receiver. When -showsTagField returns YES, -tagNames always returns a non-nil array, and when NO, -tagNames always returns nil.
-    NSOpenPanel: Should not be used.
-*/
+/**
+ `NSSavePanel`: When -showsTagField returns YES, set any initial Tag names to be displayed, if necessary, prior to displaying the receiver. Also, if the user clicks "Save", take the result of -tagNames, and set them on the resulting file after saving is complete. Tag names are NSStrings, arrays of which can be used directly with the NSURLTagNamesKey API for getting and setting tags on files. Passing `nil` or an empty array to -setTagNames: will result in no initial Tag names appearing in the receiver. When -showsTagField returns YES, -tagNames always returns a non-nil array, and when NO, -tagNames always returns `nil`.
+ `NSOpenPanel`: Not used.
+ */
 @property (nullable, copy) NSArray<NSString *> *tagNames API_AVAILABLE(macos(10.9));
 
-#pragma mark -
-#pragma mark Actions
+/**
+ `NSSavePanel`: Whether or not to show a control for selecting the type of the saved file.
+ The control shows the types in `allowedContentTypes`. Default is `NO`.
+ - Note: If @c allowedContentTypes is empty, the control is not displayed.
+ `NSOpenPanel`: Not used.
+ */
+@property BOOL showsContentTypes API_AVAILABLE(macos(15.0));
 
+/**
+ Refreshes the open or save panel's contents.
+ */
+- (void)validateVisibleColumns;
+
+// MARK: - Actions
+
 - (IBAction)ok:(nullable id)sender;
 - (IBAction)cancel:(nullable id)sender;
 
-#pragma mark -
-#pragma mark Displaying/Showing
+// MARK: - Displaying/Showing
 
-/* NSSavePanel/NSOpenPanel: Presents the panel as a sheet modal to 'window' and returns immediately. Desired properties of the panel should be properly setup before calling this method. The completion handler block will be called after the user has closed the panel, however, the open/save panel sheet may still be on screen. If you require the sheet to be offscreen (for example, to show an alert), first call [savePanel orderOut:nil] to close it. The passed in 'result' will be NSModalResponseOK==1 or NSModalResponseCancel==0.
+/**
+ `NSSavePanel`/`NSOpenPanel`: Presents the panel as a sheet modal to `window` and returns immediately. Configure the panel before calling this method. The completion handler block will be called after the user has closed the panel, however, the open/save panel sheet may still be on screen. If you require the sheet to be offscreen (for example, to show an alert), first call `[savePanel orderOut:nil]` to close it. The `result` will be `NSModalResponseOK` or `NSModalResponseCancel`.
 */
 - (void)beginSheetModalForWindow:(NSWindow *)window completionHandler:(void (^)(NSModalResponse result))handler API_AVAILABLE(macos(10.6));
 
-/* NSSavePanel/NSOpenPanel: Presents the panel as a modeless window and returns immediately. Desired properties of the panel should be properly setup before calling this method. The completion handler block will be called after the user has closed the panel. The passed in 'result' will be NSModalResponseOK==1 or NSModalResponseCancel==0.
+/**
+ `NSSavePanel`/`NSOpenPanel`: Presents the panel as a modeless window and returns immediately. Configure the panel before calling this method. The completion handler block will be called after the user has closed the panel. The `result` will be `NSModalResponseOK` or `NSModalResponseCancel`.
 */
 - (void)beginWithCompletionHandler:(void (^)(NSModalResponse result))handler API_AVAILABLE(macos(10.6));
 
-/* NSSavePanel/NSOpenPanel: Presents the panel as an application modal window. It returns only after the user has closed the panel. The return value is NSModalResponseOK==1 or NSModalResponseCancel==0.
+/**
+ `NSSavePanel`/`NSOpenPanel`: Presents the panel as an application modal window. Returns after the user has closed the panel.
+  - Returns: `NSModalResponseOK` or `NSModalResponseCancel`.
 */
 - (NSModalResponse)runModal;
 
 @end
 
+// MARK: -
 
 @protocol NSOpenSavePanelDelegate <NSObject>
 @optional
 
-/* Optional - enabled URLs.
-    NSOpenPanel: Return YES to allow the 'url' to be enabled in the panel. Delegate implementations should be fast to avoid stalling the UI. Applications linked on Mac OS 10.7 and later should be prepared to handle non-file URL schemes.
-    NSSavePanel: This method is not called; all urls are always disabled.
+/** Optional — Enabling URLs.
+ `NSSavePanel`: This method is not sent. All urls are always disabled.
+ `NSOpenPanel`: Return `YES` to allow the `url` to be enabled in the panel. Delegate implementations should be fast to avoid stalling the UI. Applications linked on Mac OS 10.7 and later should be prepared to handle non-file URL schemes.
 */
 - (BOOL)panel:(id)sender shouldEnableURL:(NSURL *)url NS_SWIFT_UI_ACTOR API_AVAILABLE(macos(10.6));
 
-/* Optional - URL validation for saving and opening files. 
-    NSSavePanel: The method is called once by the save panel when the user chooses the Save button. The user is intending to save a file at 'url'. Return YES if the 'url' is a valid location to save to. Note that an item at 'url' may not physically exist yet, unless the user decided to overwrite an existing item. Return NO and fill in the 'outError' with a user displayable error message for why the 'url' is not valid. If a recovery option is provided by the error, and recovery succeeded, the panel will attempt to close again.
-    NSOpenPanel: The method is called once for each selected filename (or directory) when the user chooses the Open button. Return YES if the 'url' is acceptable to open. Return NO and fill in the 'outError' with a user displayable message for why the 'url' is not valid for opening. You would use this method over panel:shouldEnableURL: if the processing of the selected item takes a long time. If a recovery option is provided by the error, and recovery succeeded, the panel will attempt to close again.
+/** Optional — URL validation for saving and opening files.
+ `NSSavePanel`: Sent once by the save panel when the user clicks the Save button. The user is intending to save a file at `url`. Return `YES` if the `url` is a valid location to save to. Return `NO` and return by reference `outError` with a user displayable error message for why the `url` is not valid. If a recovery option is provided by the error, and recovery succeeded, the panel will attempt to close again.
+ - Note: An item at `url` may not physically exist yet, unless the user decided to overwrite an existing item.
+ `NSOpenPanel`: Sent once for each selected filename (or directory) when the user chooses the Open button. Return `YES` if the `url` is acceptable to open. Return `NO` and return by reference `outError` with a user displayable message for why the `url` is not valid for opening. If a recovery option is provided by the error, and recovery succeeded, the panel will attempt to close again.
+ - Note: Implement this delegate method instead of  `panel:shouldEnableURL:` if the processing of the selected item takes a long time.
 */
 - (BOOL)panel:(id)sender validateURL:(NSURL *)url error:(NSError **)outError NS_SWIFT_UI_ACTOR API_AVAILABLE(macos(10.6));
 
-/* Optional - Sent when the user has changed the selected directory to the directory located at 'url'. 'url' may be nil, if the current directory can't be represented by an NSURL object (ie: the media sidebar directory, or the "Computer").
+/**
+ Optional — Sent when the user selected the directory located at `url`. `url` may be `nil`. if the current directory can't be represented by an NSURL object (ie: the media sidebar directory, or the "Computer").
 */
 - (void)panel:(id)sender didChangeToDirectoryURL:(nullable NSURL *)url NS_SWIFT_UI_ACTOR API_AVAILABLE(macos(10.6));
 
-/* Optional - Filename customization for the NSSavePanel. Allows the delegate to customize the filename entered by the user, before the extension is appended, and before the user is potentially asked to replace a file.
+/** Optional — Filename customization for the NSSavePanel. Allows the delegate to customize the filename entered by the user, before the extension is appended, and before the user is potentially asked to replace a file.
 */
 - (nullable NSString *)panel:(id)sender userEnteredFilename:(NSString *)filename confirmed:(BOOL)okFlag NS_SWIFT_UI_ACTOR;
 
-/* Optional - Sent when the user clicks the disclosure triangle to expand or collapse the file browser while in NSOpenPanel.
+/** Optional — Sent when the user clicks the disclosure triangle to expand or collapse the file browser while in NSOpenPanel.
 */
 - (void)panel:(id)sender willExpand:(BOOL)expanding NS_SWIFT_UI_ACTOR;
 
-/* Optional - Sent when the user has changed the selection.
+/** Optional — Sent when the user has changed the selection.
 */
 - (void)panelSelectionDidChange:(nullable id)sender NS_SWIFT_UI_ACTOR;
 
+/**
+ `NSSavePanel`: Optional — Sent when the content type popup is displayed and the save panel needs the display name for a type. If `nil` is returned, the save panel will display type's `localizedDescription`.
+  `NSOpenPanel`: Not sent.
+*/
+- (nullable NSString *)panel:(id)sender displayNameForType:(UTType *)type API_AVAILABLE(macos(15.0)) NS_SWIFT_UI_ACTOR;
+
+/**
+  `NSSavePanel`: Optional — Sent when the user changes the current type.
+  `NSOpenPanel`: Not sent.
+*/
+- (void)panel:(id)sender didSelectType:(nullable UTType *)type API_AVAILABLE(macos(15.0)) NS_SWIFT_UI_ACTOR;
+
 @end
 
+// MARK: -
+
 @interface NSObject(NSSavePanelDelegateDeprecated)
 
 - (BOOL)panel:(id)sender isValidFilename:(NSString *)filename API_DEPRECATED("Use -panel:validateURL:error: instead", macos(10.0,10.6));
@@ -203,20 +273,22 @@
 
 @end
 
+// MARK: -
+
 @interface NSSavePanel(NSDeprecated)
 
 - (NSString *)filename API_DEPRECATED("Use -URL instead", macos(10.0,10.6));
 - (NSString *)directory API_DEPRECATED("Use -directoryURL instead", macos(10.0,10.6));
 - (void)setDirectory:(nullable NSString *)path API_DEPRECATED("Use -setDirectoryURL: instead", macos(10.0,10.6));
-- (nullable NSString *)requiredFileType API_DEPRECATED("Use -allowedFileTypes instead", macos(10.0,10.6));
-- (void)setRequiredFileType:(nullable NSString *)type API_DEPRECATED("Use -setAllowedFileTypes: instead", macos(10.0,10.6));
+- (nullable NSString *)requiredFileType API_DEPRECATED("Use -allowedContentTypes instead", macos(10.0,10.6));
+- (void)setRequiredFileType:(nullable NSString *)type API_DEPRECATED("Use -allowedContentTypes: instead", macos(10.0,10.6));
 - (void)beginSheetForDirectory:(NSString *)path file:(nullable NSString *)name modalForWindow:(nullable NSWindow *)docWindow modalDelegate:(nullable id)delegate didEndSelector:(nullable SEL)didEndSelector contextInfo:(nullable void *)contextInfo API_DEPRECATED("Use beginSheetModalForWindow:completionHandler: instead. The following parameters are replaced by properties: 'path' is replaced by 'directoryURL' and 'name' by 'nameFieldStringValue'.", macos(10.0,10.6));
 - (NSInteger)runModalForDirectory:(nullable NSString *)path file:(nullable NSString *)name API_DEPRECATED("Use -runModal instead. The following parameters are replaced by properties: 'path' is replaced by 'directoryURL' and 'name' by 'nameFieldStringValue'.", macos(10.0,10.6));
 - (IBAction)selectText:(nullable id)sender API_DEPRECATED("Default implementation does nothing.", macos(10.0,10.3));
 
-/*
- NSSavePanel: An array of NSStrings specifying the file types the user can save the file as. The file type can be a common file extension, or a UTI. A nil value indicates that any file type can be used. If the array is not nil and the array contains no items, an exception will be raised. If no extension is given by the user, the first item in the allowedFileTypes will be used as the extension for the save panel. If the user specifies a type not in the array, and 'allowsOtherFileTypes' is YES, they will be presented with another dialog when prompted to save. The default value is 'nil'.
- NSOpenPanel: On versions less than 10.6, this property is ignored. For applications that link against 10.6 and higher, this property will determine which files should be enabled in the open panel. Using the deprecated methods to show the open panel (the ones that take a "types:" parameter) will overwrite this value, and should not be used. The allowedFileTypes can be changed while the panel is running (ie: from an accessory view). The file type can be a common file extension, or a UTI. This is also known as the "enabled file types". A nil value indicates that all files should be enabled.
+/**
+ `NSSavePanel`: An array of NSStrings specifying the file types the user can save the file as. The file type can be a common file extension, or a UTI. A nil value indicates that any file type can be used. If the array is not nil and the array contains no items, an exception will be raised. If no extension is given by the user, the first item in the allowedFileTypes will be used as the extension for the save panel. If the user specifies a type not in the array, and 'allowsOtherFileTypes' is YES, they will be presented with another dialog when prompted to save. The default value is 'nil'.
+ `NSOpenPanel`: On versions less than 10.6, this property is ignored. For applications that link against 10.6 and higher, this property will determine which files should be enabled in the open panel. Using the deprecated methods to show the open panel (the ones that take a "types:" parameter) will overwrite this value, and should not be used. The allowedFileTypes can be changed while the panel is running (ie: from an accessory view). The file type can be a common file extension, or a UTI. This is also known as the "enabled file types". A nil value indicates that all files should be enabled.
  */
 @property (nullable, copy) NSArray<NSString *> *allowedFileTypes API_DEPRECATED("Use -allowedContentTypes instead", macos(10.3,12.0));
 @end
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSearchToolbarItem.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSearchToolbarItem.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSearchToolbarItem.h	2024-04-25 05:49:40
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSearchToolbarItem.h	2024-06-01 03:52:56
@@ -16,27 +16,50 @@
 
 APPKIT_API_UNAVAILABLE_BEGIN_MACCATALYST
 
-// NSSearchToolbarItem provides the standard UI behavior for integrating a search field into the toolbar.
+/**
+ `NSSearchToolbarItem` provides the standard UI behavior for integrating a search field into the toolbar.
+ */
 API_AVAILABLE(macos(11.0)) API_UNAVAILABLE(macCatalyst)
 @interface NSSearchToolbarItem : NSToolbarItem
 
-// An NSSearchField displayed in the toolbar item. While inside the toolbar item, the field properties and layout constraints are managed by the item. The field should be configured before assigned. The width constraint for the field could be updated after assigned. When set to nil, will reset to a search field with the default configuration.
+/**
+ An `NSSearchField` displayed in the toolbar item.
+ While inside the toolbar item, the field properties and layout constraints are managed by the item.
+ The field should be configured before assigned.
+ The width constraint for the field could be updated after assigned.
+ When set to nil, will reset to a search field with the default configuration.
+ */
 @property (strong) NSSearchField *searchField API_UNAVAILABLE(macCatalyst);
 
-// The base view property is owned by the toolbar item and not available for customization.
+/**
+ The base view property is owned by the toolbar item and not available for customization.
+ */
 @property (nullable, strong) NSView *view NS_UNAVAILABLE;
 
-// When YES, the cancel button in the field resigns the first responder status of the search field as clearing the contents. The default is YES.
+/**
+ When YES, the cancel button in the field resigns the first responder status of the search field as clearing the contents.
+ The default is YES.
+ */
 @property BOOL resignsFirstResponderWithCancel;
 
-// The preferred width for the search field. This value is used to configure the search field width whenever it gets the keyboard focus.If specifying custom width constraints to the search field, they should not conflict with this value.
+/**
+ The preferred width for the search field.
+ This value is used to configure the search field width whenever it gets the keyboard focus.
+ If specifying custom width constraints to the search field, they should not conflict with this value.
+ */
 @property CGFloat preferredWidthForSearchField;
 
-// With the following two methods, clients of this toolbar item API can explicitly control the search interaction session programatically.
-// Starts a search interaction. If necessary, expands to the preferred width and moves the keyboard focus to the search field.
+/**
+ Starts a search interaction.
+ If necessary, expands to the preferred width and moves the keyboard focus to the search field.
+ */
 - (void)beginSearchInteraction;
 
-// Ends a search interaction. Gives up the first responder by calling -endEditing: to the search field. Adjusts to the natural available width for the toolbar item if necessary.
+/**
+ Ends a search interaction.
+ Gives up the first responder by calling `-endEditing:` to the search field.
+ Adjusts to the natural available width for the toolbar item if necessary.
+ */
 - (void)endSearchInteraction;
 
 @end
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingCollaborationModeRestriction.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingCollaborationModeRestriction.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingCollaborationModeRestriction.h	1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingCollaborationModeRestriction.h	2024-06-01 03:52:54
@@ -0,0 +1,84 @@
+//
+/*
+        NSSharingCollaborationModeRestriction.h
+        Application Kit
+        Copyright (c) 2023, Apple Inc.
+        All rights reserved.
+*/
+
+#import <AppKit/AppKitDefines.h>
+#import <Foundation/NSObject.h>
+#import <Foundation/NSString.h>
+#import <Foundation/NSURL.h>
+
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
+APPKIT_API_UNAVAILABLE_BEGIN_MACCATALYST
+
+/// Represents the types of sharing (collaborating on an item vs. sending a copy of the item)
+/// The share picker supports up to two modes, each of which corresponds to one of these types
+API_AVAILABLE(macos(15.0)) API_UNAVAILABLE(ios, watchos, tvos)
+typedef NS_ENUM(NSInteger, NSSharingCollaborationMode) {
+    NSSharingCollaborationModeSendCopy,
+    NSSharingCollaborationModeCollaborate,
+};
+
+/// Specifies whether a specific type of sharing should be disabled in the share picker, and if so, whether a reason should be provided for the disablement
+/// If a reason is provided, the corresponding mode will show up as an option, but an alert explaining why it is disabled will show if it is chosen, and the mode will switch back to the supported one
+/// Optionally, an extra alert button can be provided for a "recovery suggestion". This can give a user a way to fix whatever is causing this type of sharing to be disabled
+/// If no reason is provided, the corresponding mode will not show up as an option
+API_AVAILABLE(macos(15.0)) API_UNAVAILABLE(ios, watchos, tvos)
+NS_SWIFT_NAME(NSSharingServicePicker.CollaborationModeRestriction)
+@interface NSSharingCollaborationModeRestriction : NSObject<NSSecureCoding, NSCopying>
+
+/// The type of sharing which should be disabled
+@property (readonly) NSSharingCollaborationMode disabledMode;
+
+/// The title of the alert if a reason for disabling is provided
+@property (readonly, copy, nullable) NSString *alertTitle;
+
+/// The message of the alert if a reason for disabling is provided
+@property (readonly, copy, nullable) NSString *alertMessage;
+
+/// The label on the alert button which will simply confirm that the alert was viewed and dismiss it
+/// Defaults to "OK"
+@property (readonly, copy, nullable) NSString *alertDismissButtonTitle;
+
+/// The label on the recovery suggestion button if it is provided
+@property (readonly, copy, nullable) NSString *alertRecoverySuggestionButtonTitle;
+
+/// The URL that is opened when the user selects the recovery suggestion, if any
+@property (readonly, copy, nullable) NSURL *alertRecoverySuggestionButtonLaunchURL;
+
+/// - Parameters:
+///     - disabledMode: The disabled type of sharing
+- (instancetype)initWithDisabledMode:(NSSharingCollaborationMode)disabledMode;
+
+/// - Parameters:
+///     - disabledMode: The disabled type of sharing
+///     - alertTitle: The alert title
+///     - alertMessage: The alert message
+- (instancetype)initWithDisabledMode:(NSSharingCollaborationMode)disabledMode alertTitle:(NSString *)alertTitle alertMessage:(NSString *)alertMessage;
+
+/// - Parameters:
+///     - disabledMode: The disabled type of sharing
+///     - alertTitle: The alert title
+///     - alertMessage: The alert message
+///     - alertDismissButtonTitle: The label on the default alert button
+- (instancetype)initWithDisabledMode:(NSSharingCollaborationMode)disabledMode alertTitle:(NSString *)alertTitle alertMessage:(NSString *)alertMessage alertDismissButtonTitle:(NSString *)alertDismissButtonTitle;
+
+/// - Parameters:
+///     - disabledMode: The disabled type of sharing
+///     - alertTitle: The alert title
+///     - alertMessage: The alert message
+///     - alertDismissButtonTitle: The label on the default alert button
+///     - alertRecoverySuggestionButtonTitle: The label on the optional recovery suggestion button on the alert
+///     - alertRecoverySuggestionButtonLaunchURL: The URL that is opened when the optional recovery suggestion button is selected
+- (instancetype)initWithDisabledMode:(NSSharingCollaborationMode)disabledMode alertTitle:(NSString *)alertTitle alertMessage:(NSString *)alertMessage alertDismissButtonTitle:(NSString *)alertDismissButtonTitle alertRecoverySuggestionButtonTitle:(NSString *)alertRecoverySuggestionButtonTitle alertRecoverySuggestionButtonLaunchURL:(NSURL *)alertRecoverySuggestionButtonLaunchURL;
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+@end
+
+API_UNAVAILABLE_END
+NS_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingService.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingService.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingService.h	2024-04-25 05:49:36
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingService.h	2024-06-01 03:52:52
@@ -12,7 +12,7 @@
 #import <Foundation/NSObject.h>
 #import <Foundation/NSArray.h>
 
-@class NSString, NSImage, NSMenuItem, NSView, NSError, NSWindow;
+@class NSString, NSImage, NSMenuItem, NSView, NSError, NSWindow, NSSharingCollaborationModeRestriction;
 @class CKShare, CKContainer;
 
 NS_HEADER_AUDIT_BEGIN(nullability, sendability)
@@ -312,6 +312,12 @@
  Sent when the user has selected a service and before it is executed. Service will be nil if the picker was dismissed.
  */
 - (void)sharingServicePicker:(NSSharingServicePicker *)sharingServicePicker didChooseSharingService:(nullable NSSharingService *)service;
+
+/**
+ Used to specify the case where the share picker should not support some modes of sharing even if they are supported by the items being shared.
+ Disabling all possible modes at the same time is not supported behavior.
+ */
+- (nullable NSArray<NSSharingCollaborationModeRestriction *> *)sharingServicePickerCollaborationModeRestrictions:(NSSharingServicePicker *)sharingServicePicker API_AVAILABLE(macos(15.0)) API_UNAVAILABLE(ios, watchos, tvos);
 
 @end
 
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingServicePickerToolbarItem.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingServicePickerToolbarItem.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingServicePickerToolbarItem.h	2024-04-25 05:49:38
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingServicePickerToolbarItem.h	2024-06-01 03:52:54
@@ -26,7 +26,10 @@
 #if !TARGET_OS_IPHONE
 @protocol NSSharingServicePickerToolbarItemDelegate <NSSharingServicePickerDelegate>
 @required
-/* Return the items that represent the objects to be shared. They must conform to the <NSPasteboardWriting> protocol or be an NSItemProvider. (e.g. NSString, NSImage, NSURL, etc.). */
+/**
+ Return the items that represent the objects to be shared.
+ They must conform to the <NSPasteboardWriting> protocol or be an NSItemProvider. (e.g. NSString, NSImage, NSURL, etc.). 
+ */
 - (NSArray *)itemsForSharingServicePickerToolbarItem:(NSSharingServicePickerToolbarItem *)pickerToolbarItem NS_SWIFT_UI_ACTOR;
 
 @end
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSStringDrawing.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSStringDrawing.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSStringDrawing.h	2024-04-25 05:49:41
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSStringDrawing.h	2024-06-01 03:52:56
@@ -1,20 +1,28 @@
-#if !__has_include(<UIFoundation/NSStringDrawing.h>)
+#if (defined(USE_APPKIT_PUBLIC_HEADERS) && USE_APPKIT_PUBLIC_HEADERS) || !__has_include(<UIFoundation/NSStringDrawing.h>)
+#include <TargetConditionals.h>
+
+#if !TARGET_OS_IPHONE
+#import <AppKit/AppKitDefines.h>
+
 /*
         NSStringDrawing.h
-        Copyright (c) 1994-2023, Apple Inc.  All rights reserved.
+        Copyright (c) 1994-2024, Apple Inc.  All rights reserved.
 */
 
-#import <Foundation/NSString.h>
+#import <Foundation/Foundation.h>
+#import <CoreGraphics/CGGeometry.h>
 #import <AppKit/NSAttributedString.h>
 
+@class NSAttributedString;
+@class NSString;
 @class NSStringDrawingContext;
 
 NS_HEADER_AUDIT_BEGIN(nullability, sendability)
-#if !TARGET_OS_IPHONE
 
-// When attributes=nil, the methods declared here uses the default behavior for each attribute described in <AppKit/NSAttributedString.h>. When stringDrawingContext=nil, it's equivalent of passing the default instance initialized with [[NSStringDrawingContext alloc] init].
+// When attributes=nil, the methods declared here uses the default behavior for each attribute described in <UIKitCore/NSAttributedString.h>. When stringDrawingContext=nil, it's equivalent of passing the default instance initialized with [[NSStringDrawingContext alloc] init].
 
-API_AVAILABLE(macos(10.11), ios(6.0), watchos(2.0), tvos(9.0)) @interface NSStringDrawingContext : NSObject
+APPKIT_EXTERN API_AVAILABLE(macos(10.11), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0))
+@interface NSStringDrawingContext : NSObject
 
 // Minimum scale factor for drawWithRect:options:context: and boundingRectWithSize:options:context: methods. If this property is set, the extended string drawing methods will attempt to draw the attributed string in the given bounds by proportionally scaling the font(s) in the attributed string
 @property CGFloat minimumScaleFactor;
@@ -23,45 +31,62 @@
 @property (readonly) CGFloat actualScaleFactor;
 
 // bounds of the string drawn by the previous invocation of drawWithRect:options:context:
-@property (readonly) NSRect totalBounds;
+@property (readonly) CGRect totalBounds;
 
 @end
 
 @interface NSString(NSStringDrawing)
-- (NSSize)sizeWithAttributes:(nullable NSDictionary<NSAttributedStringKey, id> *)attrs API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));
-- (void)drawAtPoint:(NSPoint)point withAttributes:(nullable NSDictionary<NSAttributedStringKey, id> *)attrs API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));
-- (void)drawInRect:(NSRect)rect withAttributes:(nullable NSDictionary<NSAttributedStringKey, id> *)attrs API_AVAILABLE(macos(10.0), ios(7.0), watchos(2.0), tvos(9.0));
+- (CGSize)sizeWithAttributes:(nullable NSDictionary<NSAttributedStringKey, id> *)attrs API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+- (void)drawAtPoint:(CGPoint)point withAttributes:(nullable NSDictionary<NSAttributedStringKey, id> *)attrs API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+- (void)drawInRect:(CGRect)rect withAttributes:(nullable NSDictionary<NSAttributedStringKey, id> *)attrs API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
 @end
 
 @interface NSAttributedString(NSStringDrawing)
-- (NSSize)size API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));
-- (void)drawAtPoint:(NSPoint)point API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));
-- (void)drawInRect:(NSRect)rect API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));
+- (CGSize)size API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));
+- (void)drawAtPoint:(CGPoint)point API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));
+- (void)drawInRect:(CGRect)rect API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));
 @end
 
 typedef NS_OPTIONS(NSInteger, NSStringDrawingOptions) {
     NSStringDrawingUsesLineFragmentOrigin = 1 << 0, // The specified origin is the line fragment origin, not the base line origin
     NSStringDrawingUsesFontLeading = 1 << 1, // Uses the font leading for calculating line heights
     NSStringDrawingUsesDeviceMetrics = 1 << 3, // Uses image glyph bounds instead of typographic bounds
-    NSStringDrawingTruncatesLastVisibleLine API_AVAILABLE(macos(10.5), ios(6.0), watchos(2.0), tvos(9.0)) = 1 << 5, // Truncates and adds the ellipsis character to the last visible line if the text doesn't fit into the bounds specified. Ignored if NSStringDrawingUsesLineFragmentOrigin is not also set.
-
+    NSStringDrawingTruncatesLastVisibleLine API_AVAILABLE(macos(10.5), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0)) = 1 << 5, // Truncates and adds the ellipsis character to the last visible line if the text doesn't fit into the bounds specified. Ignored if NSStringDrawingUsesLineFragmentOrigin is not also set.
     NSStringDrawingDisableScreenFontSubstitution API_DEPRECATED("", macos(10.0,10.11)) = (1 << 2),
-    NSStringDrawingOneShot API_DEPRECATED("", macos(10.0,10.11)) = (1 << 4)
-} API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));
+    NSStringDrawingOneShot API_DEPRECATED("", macos(10.0,10.11)) = (1 << 4),
+}
+NS_SWIFT_NAME(NSString.DrawingOptions)
+API_AVAILABLE(macos(10.0), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
 
 // NOTE: All of the following methods will default to drawing on a baseline, limiting drawing to a single line.
 // To correctly draw and size multi-line text, pass NSStringDrawingUsesLineFragmentOrigin in the options parameter.
 @interface NSString (NSExtendedStringDrawing)
-- (void)drawWithRect:(NSRect)rect options:(NSStringDrawingOptions)options attributes:(nullable NSDictionary<NSAttributedStringKey, id> *)attributes context:(nullable NSStringDrawingContext *)context API_AVAILABLE(macos(10.11), ios(7.0), watchos(2.0), tvos(9.0));
-- (NSRect)boundingRectWithSize:(NSSize)size options:(NSStringDrawingOptions)options attributes:(nullable NSDictionary<NSAttributedStringKey, id> *)attributes context:(nullable NSStringDrawingContext *)context API_AVAILABLE(macos(10.11), ios(7.0), watchos(2.0), tvos(9.0));
+- (void)drawWithRect:(CGRect)rect options:(NSStringDrawingOptions)options attributes:(nullable NSDictionary<NSAttributedStringKey, id> *)attributes context:(nullable NSStringDrawingContext *)context API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+- (CGRect)boundingRectWithSize:(CGSize)size options:(NSStringDrawingOptions)options attributes:(nullable NSDictionary<NSAttributedStringKey, id> *)attributes context:(nullable NSStringDrawingContext *)context API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
 @end
 
 @interface NSAttributedString (NSExtendedStringDrawing)
-- (void)drawWithRect:(NSRect)rect options:(NSStringDrawingOptions)options context:(nullable NSStringDrawingContext *)context API_AVAILABLE(macos(10.11), ios(6.0), watchos(2.0), tvos(9.0));
-- (NSRect)boundingRectWithSize:(NSSize)size options:(NSStringDrawingOptions)options context:(nullable NSStringDrawingContext *)context API_AVAILABLE(macos(10.11), ios(6.0), watchos(2.0), tvos(9.0));
+- (void)drawWithRect:(CGRect)rect options:(NSStringDrawingOptions)options context:(nullable NSStringDrawingContext *)context API_AVAILABLE(macos(10.11), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));
+- (CGRect)boundingRectWithSize:(CGSize)size options:(NSStringDrawingOptions)options context:(nullable NSStringDrawingContext *)context API_AVAILABLE(macos(10.11), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0));
 @end
 
+NS_HEADER_AUDIT_END(nullability, sendability)
+#endif // !TARGET_OS_IPHONE
+#else
+#import <UIFoundation/NSStringDrawing.h>
+#endif
+
+#import <Foundation/Foundation.h>
+#import <AppKit/NSAttributedString.h>
+
+@class NSAttributedString;
+@class NSString;
+@class NSStringDrawingContext;
+
+#if !TARGET_OS_IPHONE
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
+
 /************************ Deprecated ************************/
 // Following NSStringDrawing methods are soft deprecated starting with OS X 10.11. It will be officially deprecated in a future release. Use corresponding API with NSStringDrawingContext instead
 @interface NSString (NSStringDrawingDeprecated)
@@ -75,9 +100,5 @@
 - (NSRect)boundingRectWithSize:(NSSize)size options:(NSStringDrawingOptions)options; // Use -boundingRectWithSize:options:context: instead
 @end
 
-#endif // !TARGET_OS_IPHONE
 NS_HEADER_AUDIT_END(nullability, sendability)
-#else
-#import <UIFoundation/NSStringDrawing.h>
-#endif
-
+#endif // !TARGET_OS_IPHONE
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSText.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSText.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSText.h	2024-04-25 05:49:40
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSText.h	2024-06-01 03:52:56
@@ -1,14 +1,38 @@
-#if !__has_include(<UIFoundation/NSText.h>)
+#if (defined(USE_APPKIT_PUBLIC_HEADERS) && USE_APPKIT_PUBLIC_HEADERS) || !__has_include(<UIFoundation/NSText.h>)
+#include <TargetConditionals.h>
+
+#if !TARGET_OS_IPHONE
+#import <AppKit/AppKitDefines.h>
+#import <Foundation/Foundation.h>
+
 /*
 	NSText.h
 	Application Kit
-	Copyright (c) 1994-2023, Apple Inc.
+	Copyright (c) 1994-2024, Apple Inc.
 	All rights reserved.
 */
 
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+#if !__NSWRITING_DIRECTION_SHARED_SECTION__
+#define __NSWRITING_DIRECTION_SHARED_SECTION__ 1
+#pragma mark NSWritingDirection
+typedef NS_ENUM(NSInteger, NSWritingDirection) {
+    NSWritingDirectionNatural       = -1,   // Determines direction using the Unicode Bidi Algorithm rules P2 and P3
+    NSWritingDirectionLeftToRight   = 0,    // Left to right writing direction
+    NSWritingDirectionRightToLeft   = 1     // Right to left writing direction
+} API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0), visionos(1.0));
+#endif // !__NSWRITING_DIRECTION_SHARED_SECTION__
+
+NS_HEADER_AUDIT_END(nullability, sendability)
+#endif // !TARGET_OS_IPHONE
+#else
+#import <UIFoundation/NSText.h>
+#endif
+
+#import <AppKit/AppKitDefines.h>
 #import <AppKit/NSView.h>
 #import <AppKit/NSSpellProtocol.h>
-#import <AppKit/AppKitDefines.h>
 
 @class NSColor, NSFont, NSNotification;
 @protocol NSTextDelegate;
@@ -17,8 +41,8 @@
 
 #if !TARGET_OS_IPHONE
 
-#if !__NSTEXT_SHARED_SECTION__
-#define __NSTEXT_SHARED_SECTION__ 1
+#if !__NSTEXT_ALIGNMENT_SHARED_SECTION__
+#define __NSTEXT_ALIGNMENT_SHARED_SECTION__ 1
 #pragma mark NSTextAlignment
 typedef NS_ENUM(NSInteger, NSTextAlignment) {
     NSTextAlignmentLeft      = 0,    // Visually left aligned
@@ -31,16 +55,9 @@
 #endif
     NSTextAlignmentJustified = 3,    // Fully-justified. The last line in a paragraph is natural-aligned.
     NSTextAlignmentNatural   = 4     // Indicates the default alignment for script
-} API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));
+} API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0), visionos(1.0));
+#endif // !__NSTEXT_ALIGNMENT_SHARED_SECTION__
 
-#pragma mark NSWritingDirection
-typedef NS_ENUM(NSInteger, NSWritingDirection) {
-    NSWritingDirectionNatural       = -1,   // Determines direction using the Unicode Bidi Algorithm rules P2 and P3
-    NSWritingDirectionLeftToRight   = 0,    // Left to right writing direction
-    NSWritingDirectionRightToLeft   = 1     // Right to left writing direction
-} API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));
-#endif // __NSTEXT_SHARED_SECTION__
-
 #endif // !TARGET_OS_IPHONE
 
 APPKIT_API_UNAVAILABLE_BEGIN_MACCATALYST
@@ -195,7 +212,5 @@
 static const NSTextAlignment NSJustifiedTextAlignment API_DEPRECATED_WITH_REPLACEMENT("NSTextAlignmentJustified", macos(10.0,10.12))  = NSTextAlignmentJustified;
 static const NSTextAlignment NSNaturalTextAlignment API_DEPRECATED_WITH_REPLACEMENT("NSTextAlignmentNatural", macos(10.0,10.12))  = NSTextAlignmentNatural;
 #endif // !TARGET_OS_IPHONE
+
 NS_HEADER_AUDIT_END(nullability, sendability)
-#else
-#import <UIFoundation/NSText.h>
-#endif
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextAttachment.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextAttachment.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextAttachment.h	2024-04-25 05:49:37
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextAttachment.h	2024-06-01 03:52:52
@@ -6,7 +6,7 @@
 
 /*
         NSTextAttachment.h
-        Copyright (c) 1994-2023, Apple Inc.
+        Copyright (c) 1994-2024, Apple Inc.
         All rights reserved.
 */
 
@@ -16,8 +16,8 @@
 NS_HEADER_AUDIT_BEGIN(nullability, sendability)
 
 enum {
-    NSAttachmentCharacter API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos) = 0xFFFC // Replacement character is used for attachments
-};
+    NSAttachmentCharacter API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0)) = 0xFFFC // Replacement character is used for attachments
+} API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
 @class NSTextContainer;
 @class NSLayoutManager;
@@ -31,38 +31,26 @@
 @protocol NSTextAttachmentCell;
 
 
-// This protocol defines the interface to attachment objects from NSLayoutManager
-@protocol NSTextAttachmentContainer <NSObject>
-// This protocol is available only for Objective-C 2 or later architecture
-
-// Returns the image object rendered by NSLayoutManager at imageBounds inside textContainer.  It should return an image appropriate for the target rendering context derived by arguments to this method.  The NSTextAttachment implementation returns -image when non-nil.  If -image==nil, it returns an image based on -contents and -fileType properties.
-- (nullable NSImage *)imageForBounds:(CGRect)imageBounds textContainer:(nullable NSTextContainer *)textContainer characterIndex:(NSUInteger)charIndex  API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-
-
-// Returns the layout bounds to the layout manager.  The bounds origin is interpreted to match position inside lineFrag.  The NSTextAttachment implementation returns -bounds if not CGRectZero; otherwise, it derives the bounds value from -[image size].  Conforming objects can implement more sophisticated logic for negotiating the frame size based on the available container space and proposed line fragment rect.
-- (CGRect)attachmentBoundsForTextContainer:(nullable NSTextContainer *)textContainer proposedLineFragment:(CGRect)lineFrag glyphPosition:(CGPoint)position characterIndex:(NSUInteger)charIndex API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-
-@end
-
 // This protocol defines the interface to attachment objects from NSTextLayoutManager
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0), visionos(1.0))
 @protocol NSTextAttachmentLayout <NSObject>
 
 // Returns the image object rendered at bounds inside textContainer.  It should return an image appropriate for the target rendering context derived by arguments to this method.  The NSTextAttachment implementation returns -image when non-nil.  If -image==nil, it returns an image based on -contents and -fileType properties.
-- (nullable NSImage *)imageForBounds:(CGRect)bounds attributes:(NSDictionary<NSAttributedStringKey, id> *)attributes location:(id <NSTextLocation>)location textContainer:(nullable NSTextContainer *)textContainer API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+- (nullable NSImage *)imageForBounds:(CGRect)bounds attributes:(NSDictionary<NSAttributedStringKey, id> *)attributes location:(id <NSTextLocation>)location textContainer:(nullable NSTextContainer *)textContainer API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0), visionos(1.0));
 
 // Returns the layout bounds. The bounds origin is interpreted to match position inside proposedLineFragment. The NSTextAttachment implementation returns -bounds if not CGRectZero; otherwise, it derives the bounds value from image.size. Conforming objects can implement more sophisticated logic for negotiating the frame size based on the available container space and proposed line fragment rect.
-- (CGRect)attachmentBoundsForAttributes:(NSDictionary<NSAttributedStringKey, id> *)attributes location:(id <NSTextLocation>)location textContainer:(nullable NSTextContainer *)textContainer proposedLineFragment:(CGRect)proposedLineFragment position:(CGPoint)position API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+- (CGRect)attachmentBoundsForAttributes:(NSDictionary<NSAttributedStringKey, id> *)attributes location:(id <NSTextLocation>)location textContainer:(nullable NSTextContainer *)textContainer proposedLineFragment:(CGRect)proposedLineFragment position:(CGPoint)position API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0), visionos(1.0));
 
 // Returns the text attachment view provider corresponding to -fileType. The default implementation queries the text attachment view provider class via +[NSTextAttachment textAttachmentViewProviderClassForFileType:]. When non-nil, it instantiates a view, then, fills properties declared in NSTextAttachmentViewProvider if implemented
-- (nullable NSTextAttachmentViewProvider *)viewProviderForParentView:(nullable NSView *)parentView location:(id <NSTextLocation>)location textContainer:(nullable NSTextContainer *)textContainer API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+- (nullable NSTextAttachmentViewProvider *)viewProviderForParentView:(nullable NSView *)parentView location:(id <NSTextLocation>)location textContainer:(nullable NSTextContainer *)textContainer API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 @end
 
-API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos) @interface NSTextAttachment : NSObject <NSTextAttachmentLayout, NSTextAttachmentContainer, NSSecureCoding>
+API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0)) @interface NSTextAttachment : NSObject <NSTextAttachmentLayout, NSSecureCoding>
 
 /**************************** Initialization ****************************/
 
 // Designated initializer.  Both arguments can be nil.  When contentData==nil || uti==nil, the receiver is consider to be an attachment without document contents.  In this case, the NSAttributedString methods writing external file format tries to save the return value of -[NSTextAttachment image] instead.
-- (instancetype)initWithData:(nullable NSData *)contentData ofType:(nullable NSString *)uti NS_DESIGNATED_INITIALIZER API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+- (instancetype)initWithData:(nullable NSData *)contentData ofType:(nullable NSString *)uti NS_DESIGNATED_INITIALIZER API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
 // Previous designated initializer on OS X. This method invokes -initWithData:ofType: with nil arguments, then, fills -fileWrapper property.
 - (instancetype)initWithFileWrapper:(nullable NSFileWrapper *)fileWrapper;
@@ -71,16 +59,16 @@
 /**************************** Content properties ****************************/
 
 // These two properties define the contents for the text attachment.  Modifying these properties have a side effect of invalidating -image and -fileWrapper properties. -fileType is an UTI describing the format for -contents.
-@property (nullable, copy) NSData *contents API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-@property (nullable, copy) NSString *fileType API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+@property (nullable, copy) NSData *contents API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+@property (nullable, copy) NSString *fileType API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
 /**************************** Rendering/layout properties ****************************/
 
 // Image representing the text attachment contents. Modifying this property invalidates -contents, -fileType, and -FileWrapper properties.
-@property (nullable, strong) NSImage *image API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+@property (nullable, strong) NSImage *image API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
 // Defines the layout bounds of the receiver's graphical representation in the text coordinate system.  The origin is at the glyph location on the text baseline.  The default value is CGRectZero.
-@property CGRect bounds API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+@property CGRect bounds API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
 /**************************** Non-image contents properties ****************************/
 
@@ -88,31 +76,34 @@
 @property (nullable, strong) NSFileWrapper *fileWrapper;
 
 // The cell which handles user interaction. By default an instance of NSTextAttachmentCell is used.
-@property (nullable, strong) id <NSTextAttachmentCell> attachmentCell API_AVAILABLE(macos(10.0)) API_UNAVAILABLE(ios, watchos, tvos);
+@property (nullable, strong) id <NSTextAttachmentCell> attachmentCell API_AVAILABLE(macos(10.0)) API_UNAVAILABLE(ios, watchos, tvos, visionos);
 
 #pragma mark Advanced Layout Properties
 // Layout padding before and after the text attachment bounds. The layout and rendering bounds X origin gets inset by the padding value. This affects the relationship between the text attachment bounds. 0.0 by default
-@property CGFloat lineLayoutPadding API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+@property CGFloat lineLayoutPadding API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0), visionos(1.0));
 
 
 #pragma mark View-based attachments
 // Factory methods for defining the mapping between UTI and text attachment view provider class
-+ (nullable Class)textAttachmentViewProviderClassForFileType:(NSString *)fileType API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
-+ (void)registerTextAttachmentViewProviderClass:(Class)textAttachmentViewProviderClass forFileType:(NSString *)fileType API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
++ (nullable Class)textAttachmentViewProviderClassForFileType:(NSString *)fileType API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos);
++ (void)registerTextAttachmentViewProviderClass:(Class)textAttachmentViewProviderClass forFileType:(NSString *)fileType API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 // When YES, the text attachment tries to use a text attachment view returned by -viewProviderForParentView:location:textContainer:. YES by default
-@property BOOL allowsTextAttachmentView API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+@property BOOL allowsTextAttachmentView API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 // Returns YES if the text attachment is configured to use text attachment views. By default, it checks -allowsTextAttachmentView, +textAttachmentViewClassForFileType:, and its contents
-@property (readonly) BOOL usesTextAttachmentView API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+@property (readonly) BOOL usesTextAttachmentView API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 @end
 
 @interface NSAttributedString (NSAttributedStringAttachmentConveniences)
 // A convenience method for creating an attributed string containing attachment using NSAttachmentCharacter as the base character.
-+ (NSAttributedString *)attributedStringWithAttachment:(NSTextAttachment *)attachment API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
++ (NSAttributedString *)attributedStringWithAttachment:(NSTextAttachment *)attachment API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+
+// A convenience method for creating an attributed string containing an attachment with attributes using NSAttachmentCharacter as the base character.
++ (instancetype)attributedStringWithAttachment:(NSTextAttachment *)attachment attributes:(NSDictionary<NSAttributedStringKey, id> *)attributes API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
 @end
 
-API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos)
 @interface NSTextAttachmentViewProvider : NSObject
 - (instancetype)initWithTextAttachment:(NSTextAttachment *)textAttachment parentView:(nullable NSView *)parentView textLayoutManager:(nullable NSTextLayoutManager *)textLayoutManager location:(id <NSTextLocation>)location NS_DESIGNATED_INITIALIZER;
 
@@ -143,6 +134,24 @@
 
 - (void)updateAttachmentsFromPath:(NSString *)path;
 
+@end
+
+// This protocol defines the interface to attachment objects from NSLayoutManager
+API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
+@protocol NSTextAttachmentContainer <NSObject>
+// This protocol is available only for Objective-C 2 or later architecture
+
+// Returns the image object rendered by NSLayoutManager at imageBounds inside textContainer.  It should return an image appropriate for the target rendering context derived by arguments to this method.  The NSTextAttachment implementation returns -image when non-nil.  If -image==nil, it returns an image based on -contents and -fileType properties.
+- (nullable NSImage *)imageForBounds:(CGRect)imageBounds textContainer:(nullable NSTextContainer *)textContainer characterIndex:(NSUInteger)charIndex  API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos);
+
+
+// Returns the layout bounds to the layout manager.  The bounds origin is interpreted to match position inside lineFrag.  The NSTextAttachment implementation returns -bounds if not CGRectZero; otherwise, it derives the bounds value from -[image size].  Conforming objects can implement more sophisticated logic for negotiating the frame size based on the available container space and proposed line fragment rect.
+- (CGRect)attachmentBoundsForTextContainer:(nullable NSTextContainer *)textContainer proposedLineFragment:(CGRect)lineFrag glyphPosition:(CGPoint)position characterIndex:(NSUInteger)charIndex API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos);
+
+@end
+
+API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
+@interface NSTextAttachment(NSTextAttachment_Deprecation) <NSTextAttachmentContainer>
 @end
 
 NS_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextCheckingClient.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextCheckingClient.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextCheckingClient.h	2024-04-25 05:49:40
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextCheckingClient.h	2024-06-01 03:52:55
@@ -25,6 +25,34 @@
    NSTextInputTraitTypeYes,
 };
 
+typedef NS_ENUM(NSInteger, NSWritingToolsBehavior) {
+    // Writing Tools will ignore this view
+    NSWritingToolsBehaviorNone = -1,
+
+    // System-defined behavior, may resolve to `None`, `Complete`, or `Limited`
+    NSWritingToolsBehaviorDefault = 0,
+
+    // The complete inline-editing experience will be provided if possible.
+    NSWritingToolsBehaviorComplete,
+
+    // The limited, overlay-panel experience will be provided if possible.
+    NSWritingToolsBehaviorLimited,
+} API_AVAILABLE(macos(15.0));
+
+typedef NS_OPTIONS(NSUInteger, NSWritingToolsAllowedInputOptions) {
+    // System—defined behavior
+    NSWritingToolsAllowedInputOptionsDefault = 0,
+
+    // Writing Tools will provide plain text in proofreading suggestions or rewrites
+    NSWritingToolsAllowedInputOptionsPlainText = 1 << 0,
+
+    // as well as plain text, Writing Tools will provide text attributes in proofreading suggestions or rewrites that are natively supported or known to be easily adopted (such as lists)
+    NSWritingToolsAllowedInputOptionsRichText = 1 << 1,
+
+    // implies `RichText`,  and Writing Tools may provide attributes for tabular layout
+    NSWritingToolsAllowedInputOptionsTable = 1 << 2,
+} API_AVAILABLE(macos(15.0));
+
 @protocol NSTextInputTraits
 @optional
 @property NSTextInputTraitType autocorrectionType;
@@ -38,6 +66,10 @@
 @property NSTextInputTraitType linkDetectionType;
 @property NSTextInputTraitType textCompletionType;
 @property NSTextInputTraitType inlinePredictionType API_AVAILABLE(macos(14.0));
+@property NSTextInputTraitType mathExpressionCompletionType API_AVAILABLE(macos(15.0));
+
+@property NSWritingToolsBehavior writingToolsBehavior API_AVAILABLE(macos(15.0));
+@property NSWritingToolsAllowedInputOptions writingToolsAllowedInputOptions API_AVAILABLE(macos(15.0));
 @end
 
 @protocol NSTextCheckingClient <NSTextInputClient, NSTextInputTraits>
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextContainer.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextContainer.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextContainer.h	2024-04-25 05:49:35
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextContainer.h	2024-06-01 03:52:50
@@ -1,51 +1,40 @@
-#if !__has_include(<UIFoundation/NSTextContainer.h>)
+#if (defined(USE_APPKIT_PUBLIC_HEADERS) && USE_APPKIT_PUBLIC_HEADERS) || !__has_include(<UIFoundation/NSTextContainer.h>)
+#include <TargetConditionals.h>
+
+#if !TARGET_OS_IPHONE
+#import <AppKit/AppKitDefines.h>
+
 /*
         NSTextContainer.h
         Application Kit
-        Copyright (c) 1994-2023, Apple Inc.
+        Copyright (c) 1994-2024, Apple Inc.
         All rights reserved.
 */
-
-#import <Foundation/NSObject.h>
+#import <Foundation/Foundation.h>
 #import <AppKit/NSParagraphStyle.h>
-#import <AppKit/NSLayoutManager.h>
 
-@class NSBezierPath;
 @class NSTextLayoutManager;
 
 NS_HEADER_AUDIT_BEGIN(nullability, sendability)
-#if !TARGET_OS_IPHONE
 
-API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) @interface NSTextContainer : NSObject <NSSecureCoding, NSTextLayoutOrientationProvider>
+APPKIT_EXTERN API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos)
+@interface NSTextContainer : NSObject <NSSecureCoding>
 
 /**************************** Initialization ****************************/
 
-- (instancetype)initWithSize:(NSSize)size NS_DESIGNATED_INITIALIZER API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0));
+- (instancetype)initWithSize:(CGSize)size NS_DESIGNATED_INITIALIZER API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 - (instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
 
-
-/**************************** Layout ****************************/
-
-// Accessor for the NSLayoutManager object owning the receiver.
-// Avoid assigning a layout manager directly through this property.  Adding a text container to a layout manager through -[NSLayoutManager addTextContainer:] will use the property for assigning the new layout manager.
-@property (nullable, assign) NSLayoutManager *layoutManager;
-
-// This method should be used instead of the primitive -setLayoutManager: if you need to replace a container's layoutManager with a new one leaving the rest of the web intact.  All the NSTextContainers on the old NSLayoutManager get transferred to the new one.  This method deals with all the work of making sure the containers don't get deallocated and removing the old layoutManager from the text storage and replacing it with the new one.
-- (void)replaceLayoutManager:(NSLayoutManager *)newLayoutManager API_AVAILABLE(macos(10.0), ios(9.0), tvos(9.0));
-
 // Returns NSTextLayoutManager owning the text container. When non-nil, -layoutManager should be nil.
-@property (weak, nullable, readonly) NSTextLayoutManager *textLayoutManager API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+@property (weak, nullable, readonly) NSTextLayoutManager *textLayoutManager API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 /************************* Container shape properties *************************/
 
 // Default value: CGSizeZero  Defines the maximum size for the layout area returned from -lineFragmentRectForProposedRect:writingDirection:remainingRect:.  0.0 and less means no limitation.
-@property NSSize size API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0));
+@property CGSize size API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
-// Default value : empty array  An array of NSBezierPath representing the exclusion paths inside the receiver's bounding rect.
-@property (copy) NSArray<NSBezierPath *> *exclusionPaths API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0));
-
 // Default value: NSLineBreakByWordWrapping  The line break mode defines the behavior of the last line inside the text container.
-@property NSLineBreakMode lineBreakMode API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0));
+@property NSLineBreakMode lineBreakMode API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 /************************* Layout constraint properties *************************/
 
@@ -53,15 +42,15 @@
 @property CGFloat lineFragmentPadding;
 
 // Default value: 0 (no limit)  The maximum number of lines that can be stored in the receiver.  This value is utilized by NSLayoutManager for determining the maximum number of lines associated with the text container.
-@property NSUInteger maximumNumberOfLines API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0));
+@property NSUInteger maximumNumberOfLines API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 /**************************** Line fragments ****************************/
 
 // Returns the bounds of a line fragment rect inside the receiver for proposedRect.  This is the intersection of proposedRect and the receiver's bounding rect defined by -size property.  The regions defined by -exclusionPaths property are excluded from the return value.  charIndex is the character location inside the text storage for the line fragment being processed.  It is possible that proposedRect can be divided into multiple line fragments due to exclusion paths.  In that case, remainingRect returns the remainder that can be passed in as the proposed rect for the next iteration.  baseWritingDirection determines the direction of advancement for line fragments inside a visual horizontal line.  The values passed into the method are either NSWritingDirectionLeftToRight or NSWritingDirectionRightToLeft.  This method can be overridden by subclasses for further text container region customization.
-- (NSRect)lineFragmentRectForProposedRect:(NSRect)proposedRect atIndex:(NSUInteger)characterIndex writingDirection:(NSWritingDirection)baseWritingDirection remainingRect:(nullable NSRect *)remainingRect API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0));
+- (CGRect)lineFragmentRectForProposedRect:(CGRect)proposedRect atIndex:(NSUInteger)characterIndex writingDirection:(NSWritingDirection)baseWritingDirection remainingRect:(nullable CGRect *)remainingRect API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 // Returns YES if the receiver is a rectangular shape defined simply by -size. TextKit utilizes this information for enabling various layout optimizations. NSLayoutManager disables non-contiguous layout when this property is NO. The default implementation returns NO when -exclusionPaths has 1 or more items, -maximumNumberOfLines is not 0, or -lineFragmentRectForProposedRect:atIndex:writingDirection:remainingRect: is overridden. It's recommended to override this property when -lineFragmentRectForProposedRect:atIndex:writingDirection:remainingRect: is overridden.
-@property (getter=isSimpleRectangularTextContainer, readonly) BOOL simpleRectangularTextContainer NS_AVAILABLE(10_0, 9_0);
+@property (getter=isSimpleRectangularTextContainer, readonly) BOOL simpleRectangularTextContainer API_AVAILABLE(macos(10.0), ios(9.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 
 /**************************** View synchronization ****************************/
@@ -70,6 +59,37 @@
 @property BOOL widthTracksTextView;
 @property BOOL heightTracksTextView;
 
+@end
+
+NS_HEADER_AUDIT_END(nullability, sendability)
+#endif // !TARGET_OS_IPHONE
+#else
+#import <UIFoundation/NSTextContainer.h>
+#endif
+
+#import <Foundation/Foundation.h>
+#import <AppKit/AppKitDefines.h>
+#import <AppKit/NSParagraphStyle.h>
+#import <AppKit/NSLayoutManager.h>
+
+@class NSBezierPath;
+@class NSTextLayoutManager;
+
+#if !TARGET_OS_IPHONE
+NS_HEADER_AUDIT_BEGIN(nullability, sendability)
+
+@interface NSTextContainer () <NSTextLayoutOrientationProvider>
+
+// Accessor for the NSLayoutManager object owning the receiver.
+// Avoid assigning a layout manager directly through this property.  Adding a text container to a layout manager through -[NSLayoutManager addTextContainer:] will use the property for assigning the new layout manager.
+@property (nullable, assign) NSLayoutManager *layoutManager API_AVAILABLE(macos(10.0), ios(9.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos);
+
+// This method should be used instead of the primitive -setLayoutManager: if you need to replace a container's layoutManager with a new one leaving the rest of the web intact.  All the NSTextContainers on the old NSLayoutManager get transferred to the new one.  This method deals with all the work of making sure the containers don't get deallocated and removing the old layoutManager from the text storage and replacing it with the new one.
+- (void)replaceLayoutManager:(NSLayoutManager *)newLayoutManager NS_SWIFT_NAME(replaceLayoutManager(_:)) API_AVAILABLE(macos(10.0), ios(9.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos);
+
+// Default value : empty array  An array of NSBezierPath representing the exclusion paths inside the receiver's bounding rect.
+@property (copy) NSArray<NSBezierPath *> *exclusionPaths API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos);
+
 // Set/get the view which the container is drawn in.  Having a view is optional.
 #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12
 @property (nullable, strong) NSTextView *textView;
@@ -108,8 +128,5 @@
 
 
 
-#endif // !TARGET_OS_IPHONE
 NS_HEADER_AUDIT_END(nullability, sendability)
-#else
-#import <UIFoundation/NSTextContainer.h>
-#endif
+#endif // !TARGET_OS_IPHONE
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextContentManager.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextContentManager.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextContentManager.h	2024-04-25 05:49:41
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextContentManager.h	2024-06-01 03:52:56
@@ -6,7 +6,7 @@
 //  NSTextContentManager.h
 //  Text Kit
 //
-//  Copyright (c) 2018-2023, Apple Inc. All rights reserved.
+//  Copyright (c) 2018-2024, Apple Inc. All rights reserved.
 //
 
 #import <Foundation/NSArray.h>
@@ -29,10 +29,10 @@
 typedef NS_OPTIONS(NSUInteger, NSTextContentManagerEnumerationOptions) {
     NSTextContentManagerEnumerationOptionsNone = 0,
     NSTextContentManagerEnumerationOptionsReverse = (1 << 0)
-} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 // NSTextElementProvider is a protocol conformed by NSTextContentManager and its concrete subclasses. It defines the base interface for interacting with a custom text document content type.
-API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos)
 @protocol NSTextElementProvider <NSObject>
 // Declares the starting and ending locations for the document. The subclass could use its own implementation of a location object conforming to NSTextRange.
 @property (strong, readonly) NSTextRange *documentRange;
@@ -59,7 +59,7 @@
 
 #pragma mark NSTextContentManager
 // NSTextContentManager is an abstract class defining the interface for managing the text document contents and the default implementation. The concrete subclass overrides NSTextElementProvider for managing the content backing store. It is the root object strongly referencing the rest of objects in the TextKit network via an array of NSTextLayoutManager. Also, it manages the editing transaction by tracking the active NSTextLayoutManager focused to be editing.
-API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos)
 @interface NSTextContentManager : NSObject <NSTextElementProvider, NSSecureCoding>
 #pragma mark Initialization
 - (instancetype)init NS_DESIGNATED_INITIALIZER;
@@ -103,7 +103,7 @@
 @end
 
 #pragma mark NSTextContentManagerDelegate
-API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos)
 @protocol NSTextContentManagerDelegate <NSObject>
 @optional
 // Returns a custom element for location. When non-nil, textContentManager uses the element instead of creating based on its standard mapping logic.
@@ -114,7 +114,7 @@
 @end
 
 #pragma mark NSTextContentStorageDelegate
-API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos)
 @protocol NSTextContentStorageDelegate <NSTextContentManagerDelegate>
 @optional
 // Returns a custom NSTextParagraph for range in NSTextContentStorage.attributedString. When non-nil, textContentStorage uses the text paragraph instead of creating the standard NSTextParagraph with the attributed substring in range. The attributed string for a custom text paragraph must have range.length.
@@ -123,7 +123,7 @@
 
 #pragma mark NSTextContentStorage
 // NSTextContentStorage is a concrete subclass of NSTextContentManager providing support for NSAttributedString backing-store. It also implements NSTextStorageObserving participating as a client of NSTextStorage. The facility only supports a single NSTextContentStorage associated with a text storage. When -textStorage!=nil, -attributedString is ignored. By default, NSTextContentStorage is initialized with NSTextStorage as the backing-store.
-API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos)
 @interface NSTextContentStorage : NSTextContentManager <NSTextStorageObserving>
 #pragma mark Basic properties
 @property (weak, nullable) id <NSTextContentStorageDelegate> delegate;
@@ -151,7 +151,7 @@
 @end
 
 // Posted by NSTextContentStorage when a text attribute unsupported by NSTextContentStorage is added to the underlying text storage.
-APPKIT_EXTERN NSNotificationName NSTextContentStorageUnsupportedAttributeAddedNotification API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+APPKIT_EXTERN NSNotificationName NSTextContentStorageUnsupportedAttributeAddedNotification API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 NS_HEADER_AUDIT_END(nullability, sendability)
 #endif // !TARGET_OS_IPHONE
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextElement.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextElement.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextElement.h	2024-04-25 05:49:35
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextElement.h	2024-06-01 03:52:50
@@ -6,7 +6,7 @@
 //  NSTextElement.h
 //  Text Kit
 //
-//  Copyright (c) 2018-2023, Apple Inc. All rights reserved.
+//  Copyright (c) 2018-2024, Apple Inc. All rights reserved.
 //
 
 
@@ -18,7 +18,7 @@
 NS_HEADER_AUDIT_BEGIN(nullability, sendability)
 
 // NSTextElement is an abstract base class for representing the smallest text layout unit typically paragraphs, tables, or attachments. A text element is associated with an NSTextContentManager.
-API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos)
 @interface NSTextElement : NSObject
 #pragma mark Initialization
 - (instancetype)initWithTextContentManager:(nullable NSTextContentManager *)textContentManager NS_DESIGNATED_INITIALIZER;
@@ -33,19 +33,19 @@
 #pragma mark Child Elements
 // A concrete NSTextElement subclass can be structured in a tree. An element can have zero or more child elements. This section provides interface for supporting such a configuration.
 // Returns an array of children. The array can contain zero or more elements.
-@property (readonly, copy) NSArray<__kindof NSTextElement *> *childElements API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0)) API_UNAVAILABLE(watchos);
+@property (readonly, copy) NSArray<__kindof NSTextElement *> *childElements API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 // Returns the parent element if the receiver is a child.
-@property (nullable, readonly, weak) __kindof NSTextElement *parentElement API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0)) API_UNAVAILABLE(watchos);
+@property (nullable, readonly, weak) __kindof NSTextElement *parentElement API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 // Returns YES if it is an element represented in text layout. It is enumerated by NSTextContentManager.
-@property (readonly) BOOL isRepresentedElement API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0)) API_UNAVAILABLE(watchos);
+@property (readonly) BOOL isRepresentedElement API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 @end
 
 #pragma mark NSTextParagraph
 // NSTextParagraph represents a single paragraph backed by NSAttributedString as the contents.
-API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos)
 @interface NSTextParagraph : NSTextElement
 #pragma mark Initialization
 - (instancetype)initWithAttributedString:(nullable NSAttributedString *)attributedString NS_DESIGNATED_INITIALIZER;
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextInputClient.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextInputClient.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextInputClient.h	2024-04-25 05:49:37
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextInputClient.h	2024-06-01 03:52:52
@@ -16,6 +16,7 @@
 APPKIT_API_UNAVAILABLE_BEGIN_MACCATALYST
 
 @class NSAttributedString;
+@class NSAdaptiveImageGlyph;
 
 typedef NS_ENUM(NSInteger, NSTextCursorAccessoryPlacement) {
     NSTextCursorAccessoryPlacementUnspecified,
@@ -111,6 +112,11 @@
  To support dictation indicator on custom text view, expose this method and `-selectionRect`, and also calls `-[NSTextInputContext willStartScrollingOrZooming]`/ `-[NSTextInputContext didEndScrollingOrZooming]` when needed.
  */
 @property (readonly) NSRect documentVisibleRect API_AVAILABLE(macos(14.0));
+
+@optional
+@property (readonly) BOOL supportsAdaptiveImageGlyph API_AVAILABLE(macos(15.0));
+
+- (void)insertAdaptiveImageGlyph:(NSAdaptiveImageGlyph *)adaptiveImageGlyph replacementRange:(NSRange)replacementRange NS_SWIFT_NAME(insert(_:replacementRange:)) API_AVAILABLE(macos(15.0));
 
 @end
 
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextInsertionIndicator.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextInsertionIndicator.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextInsertionIndicator.h	2024-04-25 05:49:35
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextInsertionIndicator.h	2024-06-01 03:52:51
@@ -28,8 +28,8 @@
 @property NSTextInsertionIndicatorDisplayMode displayMode;
 
 /// The color of the indicator.
-/// @discussion Defaults to the system accent color.
-/// @note If set to @c nil, uses the system accent color.
+/// @discussion Defaults to NSColor.textInsertionPointColor.
+/// @note If set to @c nil, uses NSColor.textInsertionPointColor.
 @property(copy, null_resettable) NSColor *color;
 
 /// Options for the NSTextInsertionIndicatorDisplayModeAutomatic display mode.
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextLayoutFragment.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextLayoutFragment.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextLayoutFragment.h	2024-04-25 05:49:35
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextLayoutFragment.h	2024-06-01 03:52:50
@@ -6,7 +6,7 @@
 //  NSTextLayoutFragment.h
 //  Text Kit
 //
-//  Copyright (c) 2017-2023, Apple Inc. All rights reserved.
+//  Copyright (c) 2017-2024, Apple Inc. All rights reserved.
 //
 
 #import <Foundation/NSArray.h>
@@ -31,16 +31,16 @@
   NSTextLayoutFragmentEnumerationOptionsEstimatesSize = (1 << 1), // When enumerating, the layout fragments will be asked to estimate their size.
   NSTextLayoutFragmentEnumerationOptionsEnsuresLayout = (1 << 2), // When enumerating, the layout fragments will be asked to layout.
   NSTextLayoutFragmentEnumerationOptionsEnsuresExtraLineFragment = (1 << 3), // It synthesizes the extra line fragment when necessary.
-} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 typedef NS_ENUM(NSUInteger, NSTextLayoutFragmentState) {
   NSTextLayoutFragmentStateNone = 0, // No layout information
   NSTextLayoutFragmentStateEstimatedUsageBounds = 1, // When associated with NSTextLayoutManager, filled with an estimated rect if no layout
   NSTextLayoutFragmentStateCalculatedUsageBounds = 2, // layout fragment measurements available without textLineFragments
   NSTextLayoutFragmentStateLayoutAvailable = 3 // textLineFragments and layout fragment measurements available
-} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
-API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos)
 @interface NSTextLayoutFragment : NSObject <NSSecureCoding>
 #pragma mark Initialization
 - (instancetype)initWithTextElement:(NSTextElement *)textElement range:(nullable NSTextRange *)rangeInElement NS_DESIGNATED_INITIALIZER;
@@ -63,10 +63,10 @@
 @property (copy, readonly) NSArray<NSTextLineFragment *> *textLineFragments;
 
 // Returns the NSTextLineFragment containing verticalOffset if found. When requiresExactMatch=NO, it returns the closest line fragment beyond verticalOffset if no line fragment contains verticalOffset.
-- (nullable NSTextLineFragment *)textLineFragmentForVerticalOffset:(CGFloat)verticalOffset requiresExactMatch:(BOOL)requiresExactMatch API_AVAILABLE(macos(14.0), ios(17.0), tvos(17.0)) API_UNAVAILABLE(watchos);
+- (nullable NSTextLineFragment *)textLineFragmentForVerticalOffset:(CGFloat)verticalOffset requiresExactMatch:(BOOL)requiresExactMatch API_AVAILABLE(macos(14.0), ios(17.0), tvos(17.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 // Returns the NSTextLineFragment containing textLocation. When isUpstreamAffinity=YES, it returns the text line fragment ending at textLocation.
-- (nullable NSTextLineFragment *)textLineFragmentForTextLocation:(id <NSTextLocation>)textLocation isUpstreamAffinity:(BOOL)isUpstreamAffinity API_AVAILABLE(macos(14.0), ios(17.0), tvos(17.0)) API_UNAVAILABLE(watchos);
+- (nullable NSTextLineFragment *)textLineFragmentForTextLocation:(id <NSTextLocation>)textLocation isUpstreamAffinity:(BOOL)isUpstreamAffinity API_AVAILABLE(macos(14.0), ios(17.0), tvos(17.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 // When non-nil, the layout operation is dispatched to the queue asynchronously.
 @property (nullable, strong) NSOperationQueue *layoutQueue;
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextLayoutManager.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextLayoutManager.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextLayoutManager.h	2024-04-25 05:49:34
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextLayoutManager.h	2024-06-01 03:52:49
@@ -6,7 +6,7 @@
 //  NSTextLayoutManager.h
 //  Text Kit
 //
-//  Copyright (c) 2017-2023, Apple Inc. All rights reserved.
+//  Copyright (c) 2017-2024, Apple Inc. All rights reserved.
 //
 
 
@@ -31,7 +31,7 @@
     NSTextLayoutManagerSegmentTypeStandard = 0, // The standard segment matching the typographic bounds of range.
     NSTextLayoutManagerSegmentTypeSelection = 1, // The segment behavior suitable for the selection rendering. Extends the last segment in a line fragment to the trailing edge if continuing to the next line.
     NSTextLayoutManagerSegmentTypeHighlight = 2, // The segment behavior suitable for highlighting.
-} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 typedef NS_OPTIONS(NSUInteger, NSTextLayoutManagerSegmentOptions) {
     NSTextLayoutManagerSegmentOptionsNone = 0,
@@ -40,10 +40,10 @@
     NSTextLayoutManagerSegmentOptionsHeadSegmentExtended = (1 << 2), // When specified, the segment is extended to the head edge
     NSTextLayoutManagerSegmentOptionsTailSegmentExtended = (1 << 3), // When specified, the segment is extended to the tail edge.
     NSTextLayoutManagerSegmentOptionsUpstreamAffinity = (1 << 4), // When specified, the segment is placed based on the upstream affinity for an empty range.
-} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 // NSTextLayoutManager is the center piece of the TextKit object network maintaining the layout geometry via an array of NSTextContainer and layout results with NSTextLayoutFragment associated with NSTextElement vended from the owner NSTextContentManager.
-API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos)
 @interface NSTextLayoutManager : NSObject <NSSecureCoding, NSTextSelectionDataSource>
 #pragma mark Initialization
 - (instancetype)init NS_DESIGNATED_INITIALIZER;
@@ -145,7 +145,7 @@
 @end
 
 #pragma mark NSTextLayoutManagerDelegate
-API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos)
 @protocol NSTextLayoutManagerDelegate <NSObject>
 @optional
 // NSTextLayoutFragment management
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextLineFragment.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextLineFragment.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextLineFragment.h	2024-04-25 05:49:38
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextLineFragment.h	2024-06-01 03:52:53
@@ -6,7 +6,7 @@
 //  NSTextLineFragment.h
 //  Text Kit
 //
-//  Copyright (c) 2017-2023, Apple Inc. All rights reserved.
+//  Copyright (c) 2017-2024, Apple Inc. All rights reserved.
 //
 
 #import <Foundation/NSArray.h>
@@ -17,7 +17,7 @@
 
 #pragma mark NSTextLineFragment
 // NSTextLineFragment represents a single textual layout and rendering unit inside NSTextLayoutFragment.
-API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos)
 @interface NSTextLineFragment : NSObject <NSSecureCoding>
 #pragma mark Initialization
 - (instancetype)initWithAttributedString:(NSAttributedString *)attributedString range:(NSRange)range NS_DESIGNATED_INITIALIZER;
@@ -42,7 +42,7 @@
 // Rendering origin for the left most glyph in the line fragment coordinate system
 @property (readonly) CGPoint glyphOrigin;
 
-// Renders the line fragment contents at the rendering origin. The origin can be specified as (NSMinX(typographicBounds) + glyphOrigin.x, NSMinY(typographicBounds) + glyphOrigin.y) relative to the line fragment group coordinate system
+// Renders the line fragment contents at the rendering origin. The origin can be specified as (CGRectGetMinX(typographicBounds), CGRectGetMinY(typographicBounds)) relative to the parent layout fragment coordinate system.
 - (void)drawAtPoint:(CGPoint)point inContext:(CGContextRef)context;
 
 #pragma mark Character and point mappings
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextList.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextList.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextList.h	2024-04-25 05:49:37
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextList.h	2024-06-01 03:52:53
@@ -6,7 +6,7 @@
 //  NSTextList.h
 //  Text Kit
 //
-//  Copyright (c) 2004-2023, Apple Inc. All rights reserved.
+//  Copyright (c) 2004-2024, Apple Inc. All rights reserved.
 
 #import <Foundation/NSObject.h>
 #import <AppKit/AppKitDefines.h>
@@ -15,33 +15,33 @@
 // NSTextList represents a stylistic format of a group of text list items belonging to the same nested level. It supports both ordered and unordered lists. The type of marker is defined by markerFormat.
 
 typedef NS_OPTIONS(NSUInteger, NSTextListOptions) {
-    NSTextListPrependEnclosingMarker API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos) = (1 << 0), // All marker strings up to the top-level parent are concatenated to the marker string used by the text list item.
-};
+    NSTextListPrependEnclosingMarker API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0)) = (1 << 0), // All marker strings up to the top-level parent are concatenated to the marker string used by the text list item.
+} API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
-typedef NSString * NSTextListMarkerFormat NS_TYPED_EXTENSIBLE_ENUM API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerBox API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerCheck API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerCircle API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerDiamond API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerDisc API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerHyphen API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerSquare API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerLowercaseHexadecimal API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerUppercaseHexadecimal API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerOctal API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerLowercaseAlpha API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerUppercaseAlpha API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerLowercaseLatin API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerUppercaseLatin API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerLowercaseRoman API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerUppercaseRoman API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
-APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerDecimal API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos);
+typedef NSString * NSTextListMarkerFormat NS_TYPED_EXTENSIBLE_ENUM API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerBox API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerCheck API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerCircle API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerDiamond API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerDisc API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerHyphen API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerSquare API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerLowercaseHexadecimal API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerUppercaseHexadecimal API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerOctal API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerLowercaseAlpha API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerUppercaseAlpha API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerLowercaseLatin API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerUppercaseLatin API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerLowercaseRoman API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerUppercaseRoman API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
+APPKIT_EXTERN NSTextListMarkerFormat const NSTextListMarkerDecimal API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0));
 
-API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(10.0), ios(7.0), tvos(9.0), watchos(2.0), visionos(1.0))
 @interface NSTextList : NSObject <NSSecureCoding, NSCopying>
 
 #pragma mark Initialization
-- (instancetype)initWithMarkerFormat:(NSTextListMarkerFormat)markerFormat options:(NSTextListOptions)options startingItemNumber:(NSInteger)startingItemNumber NS_DESIGNATED_INITIALIZER API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0)) API_UNAVAILABLE(watchos);
+- (instancetype)initWithMarkerFormat:(NSTextListMarkerFormat)markerFormat options:(NSTextListOptions)options startingItemNumber:(NSInteger)startingItemNumber NS_DESIGNATED_INITIALIZER API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0), watchos(9.0), visionos(1.0));
 - (instancetype)initWithMarkerFormat:(NSTextListMarkerFormat)markerFormat options:(NSUInteger)options;
 
 - (nullable instancetype) initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@@ -55,7 +55,7 @@
 @property NSInteger startingItemNumber;
 
 // Yes if markerFormat is an ordered text list type
-@property (readonly, getter=isOrdered) BOOL ordered API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0)) API_UNAVAILABLE(watchos);
+@property (readonly, getter=isOrdered) BOOL ordered API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0), watchos(9.0), visionos(1.0));
 
 #pragma mark Resolved Marker String
 // Returns the marker corresponding to itemNumber. itemNumber is ignored if < 1 or isOrdered==NO.
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextListElement.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextListElement.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextListElement.h	2024-04-25 05:49:34
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextListElement.h	2024-06-01 03:52:49
@@ -6,7 +6,7 @@
 //  NSTextListElement.h
 //  Text Kit
 //
-//  Copyright (c) 2021-2023, Apple Inc. All rights reserved.
+//  Copyright (c) 2021-2022, Apple Inc. All rights reserved.
 //
 
 #import <Foundation/Foundation.h>
@@ -19,7 +19,7 @@
 // NSTextListElement is a concrete subclass of NSTextElement representing a text list node. It can contain an array of child element. A text list can be represented by a tree of NSTextListElements.
 #pragma mark NSTextListElement
 
-API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0), visionos(1.0)) API_UNAVAILABLE(watchos)
 @interface NSTextListElement : NSTextParagraph
 #pragma mark Initializer
 // Designated initializer. Initializes 2 types of NSTextListElement: a standard list item and nesting parent element. Either of contents, markerAttributes, or childElements must be non-nil. Clients should typically use one of 2 factory methods below for instantiating with a specific type. When markerAttributes!=nil, it will be used to format the marker; otherwise, it is derived from contents.
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextRange.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextRange.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextRange.h	2024-04-25 05:49:34
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextRange.h	2024-06-01 03:52:49
@@ -6,7 +6,7 @@
 //  NSTextRange.h
 //  Text Kit
 //
-//  Copyright (c) 2018-2023, Apple Inc. All rights reserved.
+//  Copyright (c) 2018-2024, Apple Inc. All rights reserved.
 //
 
 #import <Foundation/NSObject.h>
@@ -15,16 +15,16 @@
 
 #pragma mark NSTextLocation
 // NSTextLocation represents an abstract location inside document contents. A concrete class conforming to the protocol should be associated with a particular document backing store type. The interpretation of a location in enumeration operations is depending on the logical direction. When enumerating forward, it should start with the item containing the location. The enumeration should start with an item preceding the location for reverse operations.
-API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos) NS_PROTOCOL_REQUIRES_EXPLICIT_IMPLEMENTATION
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0), visionos(1.0)) NS_PROTOCOL_REQUIRES_EXPLICIT_IMPLEMENTATION
 @protocol NSTextLocation <NSObject>
 
 // Compares and returns the logical ordering to location
-- (NSComparisonResult)compare:(id <NSTextLocation>)location API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+- (NSComparisonResult)compare:(id <NSTextLocation>)location API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0), visionos(1.0));
 @end
 
 #pragma mark NSTextRange
 // NSTextRange represents a contiguous range between two locations inside document contents. It consists of the starting location and terminating location. They are the two basic properties, location and endLocation, respectively. The terminating location, endLocation, is directly following the last location in the range. So, a location is contained in a range if (range.location <= location) && (location < range.endLocation).
-API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0), visionos(1.0))
 @interface NSTextRange : NSObject
 #pragma mark Initialization
 // Returns an empty range when endLocation=nil
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextSelection.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextSelection.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextSelection.h	2024-04-25 05:49:38
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextSelection.h	2024-06-01 03:52:53
@@ -6,7 +6,7 @@
 //  NSTextSelection.h
 //  Text Kit
 //
-//  Copyright (c) 2018-2023, Apple Inc. All rights reserved.
+//  Copyright (c) 2018-2024, Apple Inc. All rights reserved.
 //
 
 #import <Foundation/NSAttributedString.h>
@@ -26,14 +26,14 @@
   NSTextSelectionGranularityParagraph,
   NSTextSelectionGranularityLine,
   NSTextSelectionGranularitySentence
-} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 typedef NS_ENUM(NSInteger, NSTextSelectionAffinity) {
   NSTextSelectionAffinityUpstream = 0,
   NSTextSelectionAffinityDownstream = 1
-} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
-API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos)
 @interface NSTextSelection : NSObject <NSSecureCoding>
 #pragma mark Initialization
 // textRanges should be ordered and not overlapping. Otherwise, textRanges would get normalized by reordered and merging overlapping ranges.
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextSelectionNavigation.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextSelectionNavigation.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextSelectionNavigation.h	2024-04-25 05:49:35
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextSelectionNavigation.h	2024-06-01 03:52:50
@@ -6,7 +6,7 @@
 //  NSTextSelectionNavigation.h
 //  Text Kit
 //
-//  Copyright (c) 2019-2023, Apple Inc. All rights reserved.
+//  Copyright (c) 2019-2024, Apple Inc. All rights reserved.
 //
 
 #import <Foundation/NSObject.h>
@@ -35,7 +35,7 @@
     NSTextSelectionNavigationDirectionLeft,
     NSTextSelectionNavigationDirectionUp,
     NSTextSelectionNavigationDirectionDown
-} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 typedef NS_ENUM(NSInteger, NSTextSelectionNavigationDestination) {
     NSTextSelectionNavigationDestinationCharacter, // Moving to the next extended grapheme cluster boundary. Could result in a location inside a cluster depending on operations. When the movement direction is not along the line (i.e. up and down for a horizontal line), it moves to the adjacent line using the anchor point instead of resolving to the logical direction
@@ -45,25 +45,25 @@
     NSTextSelectionNavigationDestinationParagraph, // Moving to the next paragraph boundary. Ignores the end of line elastic characters and paragraph separators
     NSTextSelectionNavigationDestinationContainer, // Moving to the next container/page boundary. Ignores the end of line elastic characters and container/page separators
     NSTextSelectionNavigationDestinationDocument, // Moving to the document boundary
-} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 typedef NS_OPTIONS(NSUInteger, NSTextSelectionNavigationModifier) {
     NSTextSelectionNavigationModifierExtend = (1 << 0), // Extends the selection by not moving the initial location while drag selection
     NSTextSelectionNavigationModifierVisual = (1 << 1), // Extends the selection visually inside the rectangular area defined by the anchor and dragged positions
     NSTextSelectionNavigationModifierMultiple = (1 << 2), // Extends the selection visually inside the rectangular area defined by the anchor and dragged positions and produces an NSTextSelection per line
-} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 typedef NS_ENUM(NSInteger, NSTextSelectionNavigationWritingDirection) {
     NSTextSelectionNavigationWritingDirectionLeftToRight   = 0,    // Left to right writing direction
     NSTextSelectionNavigationWritingDirectionRightToLeft   = 1     // Right to left writing direction
-} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
 typedef NS_ENUM(NSInteger, NSTextSelectionNavigationLayoutOrientation) {
     NSTextSelectionNavigationLayoutOrientationHorizontal = 0, // Lines rendered horizontally, grow top to bottom
     NSTextSelectionNavigationLayoutOrientationVertical = 1, // Lines rendered vertically, grow right to left
-} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos);
+} API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos);
 
-API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos)
 @interface NSTextSelectionNavigation : NSObject
 #pragma mark Initialization
 - (instancetype)initWithDataSource:(id <NSTextSelectionDataSource>)dataSource NS_DESIGNATED_INITIALIZER;
@@ -106,7 +106,7 @@
 - (NSArray<NSTextRange *> *)deletionRangesForTextSelection:(NSTextSelection *)textSelection direction:(NSTextSelectionNavigationDirection)direction destination:(NSTextSelectionNavigationDestination)destination allowsDecomposition:(BOOL)allowsDecomposition;
 @end
 
-API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos)
 @protocol NSTextSelectionDataSource <NSObject>
 @required
 // Declares the starting and ending locations for the document.
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextView.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextView.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextView.h	2024-04-25 05:49:37
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextView.h	2024-06-01 03:52:52
@@ -50,6 +50,7 @@
 @class NSSharingServicePicker;
 @class NSValue;
 @class NSTextAttachment;
+@class NSTextRange;
 
 /* Values for NSSelectionGranularity */
 typedef NS_ENUM(NSUInteger, NSSelectionGranularity) {
@@ -234,6 +235,7 @@
 #pragma mark Dark Mode
 // When YES, enables the adaptive color mapping mode. In this mode under the dark effective appearance, NSTextView maps all colors with NSColorTypeComponentBased by inverting the brightness whenever they are coming in and out of the model object, NSTextStorage. For example, when rendering, interacting with NSColorPanel and NSFontManager, and converting from/to the pasteboard and external formats, the color values are converted between the model and rendering contexts. Note that the color conversion algorithm compresses the brightness range and, therefore, does not retain the round-trip fidelity between the light and dark appearances. It may not be suitable for rich text authoring, so it is a good idea to provide a command or preference for your users to see and edit their docs without this option, or in light mode.
 @property BOOL usesAdaptiveColorMappingForDarkAppearance API_AVAILABLE(macos(10.14));
+
 @end
 
 @interface NSTextView (NSCompletion)
@@ -251,7 +253,6 @@
 
 // Called with final == NO as the user moves through the potential completions, then with final == YES when a completion is definitively selected (or completion is cancelled and the original value is reinserted).  The default implementation inserts the completion into the text at the appropriate location.  The movement argument takes its values from the movement codes defined in NSText.h, and allows subclassers to distinguish between canceling completion and selection by arrow keys, by return, by tab, or by other means such as clicking.
 - (void)insertCompletion:(NSString *)word forPartialWordRange:(NSRange)charRange movement:(NSInteger)movement isFinal:(BOOL)flag;
-
 @end
 
 @interface NSTextView (NSPasteboard)
@@ -420,12 +421,15 @@
 @property BOOL usesFontPanel;
 @property (getter=isRulerVisible) BOOL rulerVisible;
 - (void)setSelectedRange:(NSRange)charRange;
-    // Other NSText methods are implemented in the base NSTextView implementation rather than in this category.  See NSText.h for declarations.
+// Other NSText methods are implemented in the base NSTextView implementation rather than in this category.  See NSText.h for declarations.
 
 /*************************** Input Source support ***************************/
 /* Returns an array of locale identifiers representing keyboard input sources allowed to be enabled when the receiver has the keyboard focus.
  */
 @property (nullable, copy) NSArray<NSString *> *allowedInputSourceLocales API_AVAILABLE(macos(10.5));
+
+#pragma mark WritingTools
+@property(nonatomic,readonly,getter=isWritingToolsActive) BOOL writingToolsActive API_AVAILABLE(macos(15.0));
 @end
 
 @interface NSTextView (NSTextChecking)
@@ -476,6 +480,9 @@
 // Allows clients to turn inline prediction on or off for this view. The default setting should be appropriate for most purposes, but in some cases clients may wish to set this explicitly.
 @property NSTextInputTraitType inlinePredictionType API_AVAILABLE(macos(14.0));
 
+// Allows clients to turn math inline completion on or off for this view.
+@property NSTextInputTraitType mathExpressionCompletionType API_AVAILABLE(macos(15.0));
+
 @end
 
 @interface NSTextView (NSQuickLookPreview)
@@ -539,6 +546,19 @@
 + (NSScrollView *)scrollablePlainDocumentContentTextView API_AVAILABLE(macos(10.14));
 @end
 
+#pragma mark NSTextHighlight
+@interface NSTextView (NSTextView_TextHighlight)
+/*************************** Text Highlight  support ***************************/
+// Attributes for NSTextHighlightStyleAttributeName rendering. It is consulted when the corresponding NSTextHighlightColorSchemeAttributeName is NSTextHighlightColorSchemeDefault. NSForegroundColorAttributeName overrides the text color, and NSBackgroundColorAttributeName specifies the highlight color rendered with drawTextHighlightBackground(for textRange:, origin:). When NSForegroundColorAttributeName is missing, it uses the text color specified by the document content. When NSBackgroundColorAttributeName is not specified, it is derived from NSForegroundColorAttributeName.
+@property (copy) NSDictionary<NSAttributedStringKey, id> *textHighlightAttributes API_AVAILABLE(macos(15.0));
+
+// Renders the text highlight background for NSTextHighlightStyleAttributeName in textRange. origin specifies the coordinate origin in the NSTextContainer coordinate system of the rendering context.
+- (void)drawTextHighlightBackgroundForTextRange:(NSTextRange *)textRange origin:(NSPoint)origin API_AVAILABLE(macos(15.0));
+
+// An action for toggling NSTextHighlightStyleAttributeName in the selected range.
+- (IBAction)highlight:(nullable id)sender API_AVAILABLE(macos(15.0));
+@end
+
 @interface NSTextView (NSDeprecated)
 
 // toggleBaseWritingDirection: will be deprecated in favor of the new NSResponder methods makeBaseWritingDirectionNatural:, makeBaseWritingDirectionLeftToRight:, and makeBaseWritingDirectionRightToLeft:, which NSTextView now implements.
@@ -629,6 +649,11 @@
 // Delegate only. Notifies the delegate that the user selected the candidate at index in -[NSCandidateListTouchBarItem candidates] for textView.candidateListTouchBarItem. When no candidate selected, index is NSNotFound. Returning YES allows textView to insert the candidate into the text storage if it's NSString, NSAttributedString, or NSTextCheckingResult.
 - (BOOL)textView:(NSTextView *)textView shouldSelectCandidateAtIndex:(NSUInteger)index NS_SWIFT_UI_ACTOR API_AVAILABLE(macos(10.12.2));
 
+#pragma mark WritingTools
+// Delegate only.
+- (void)textViewWritingToolsWillBegin:(NSTextView *)textView NS_SWIFT_UI_ACTOR API_AVAILABLE(macos(15.0));
+- (void)textViewWritingToolsDidEnd:(NSTextView *)textView NS_SWIFT_UI_ACTOR API_AVAILABLE(macos(15.0));
+- (NSArray<NSValue *> *)textView:(NSTextView *)textView writingToolsIgnoredRangesInEnclosingRange:(NSRange)enclosingRange NS_SWIFT_UI_ACTOR API_AVAILABLE(macos(15.0));
 
 // The following delegate-only methods are deprecated in favor of the more verbose ones above.
 - (BOOL)textView:(NSTextView *)textView clickedOnLink:(null_unspecified id)link API_DEPRECATED("Use -textView:clickedOnLink:atIndex: instead", macos(10.0,10.6));
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextViewportLayoutController.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextViewportLayoutController.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextViewportLayoutController.h	2024-04-25 05:49:41
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextViewportLayoutController.h	2024-06-01 03:52:56
@@ -6,7 +6,7 @@
 //  NSTextViewportLayoutController.h
 //  Text Kit
 //
-//  Copyright (c) 2017-2023, Apple Inc. All rights reserved.
+//  Copyright (c) 2017-2024, Apple Inc. All rights reserved.
 //
 
 #import <Foundation/NSObject.h>
@@ -23,7 +23,7 @@
 // A viewport is a rectangular area within a flipped coordinate system expanding along the y-axis. With text contents, lines advance along the expanding direction typically. It defines the active area where text layout fragments laid out. The area corresponds to the user visible area with additional over-scroll region in most cases. NSTextViewportLayoutController manages the layout process inside the viewport interacting with its delegate.
 
 #pragma mark NSTextViewportLayoutControllerDelegate
-API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos)
 @protocol NSTextViewportLayoutControllerDelegate <NSObject>
 #pragma mark Properties
 // The current viewport, typically the view visible bounds with overdraw.
@@ -48,7 +48,7 @@
 @end
 
 #pragma mark NSTextViewportLayoutController
-API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), visionos(1.0)) API_UNAVAILABLE(watchos)
 @interface NSTextViewportLayoutController : NSObject
 #pragma mark Initialization
 - (instancetype)initWithTextLayoutManager:(NSTextLayoutManager *)textLayoutManager NS_DESIGNATED_INITIALIZER;
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbar.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbar.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbar.h	2024-04-25 05:49:34
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbar.h	2024-06-01 03:52:49
@@ -15,6 +15,7 @@
 
 typedef NSString * NSToolbarUserInfoKey NS_TYPED_ENUM;
 APPKIT_EXTERN NSToolbarUserInfoKey const NSToolbarItemKey API_AVAILABLE(macos(13.0));
+APPKIT_EXTERN NSToolbarUserInfoKey const NSToolbarNewIndexKey API_AVAILABLE(macos(15.0));
 
 @class NSToolbarItem, NSWindow, NSView;
 @protocol NSToolbarDelegate;
@@ -36,131 +37,253 @@
 API_AVAILABLE(ios(13.0)) NS_SWIFT_UI_ACTOR
 @interface NSToolbar : NSObject
 
-/* The identifier is used to form the toolbar's autosave name.  Also, toolbars with the same identifier are implicitly synchronized so that they maintain the same state. */
+/**
+ The identifier is used to form the toolbar's autosave name.
+ Toolbars with the same identifier are implicitly synchronized so that they maintain the same state.
+ */
 - (instancetype)initWithIdentifier:(NSToolbarIdentifier)identifier NS_DESIGNATED_INITIALIZER;
 
-/* Calls through to -initWithIdentifier: with an empty string identifier.  Customizable toolbars should use -initWithIdentifier: with a unique identifier instead. */
+/**
+ Calls through to -initWithIdentifier: with an empty string identifier.
+ Customizable toolbars should use `-initWithIdentifier:` with a unique identifier instead.
+ */
 - (instancetype)init API_AVAILABLE(macos(10.13));
 
-/* Primitives for explicitly adding and removing items.  Any change made will be propagated immediately to all other toolbars with the same identifier. */
+/**
+ Inserts an item with the specified identifier in the receiving toolbar at the specified index.
+ 
+ Any change made will be propagated immediately to all other toolbars with the same identifier.
+ */
 - (void)insertItemWithItemIdentifier:(NSToolbarItemIdentifier)itemIdentifier atIndex:(NSInteger)index;
+
+/**
+ Removes the item at the specified index in the receiving toolbar.
+ 
+ Any change made will be propagated immediately to all other toolbars with the same identifier.
+ */
 - (void)removeItemAtIndex:(NSInteger)index;
 
-/* Customizable toolbars must have a delegate, and must implement the required NSToolbarDelegate methods. */
+/**
+ Removes the item with matching `itemIdentifier` in the receiving toolbar. If multiple items share the same identifier (as is the case with space items) all matching items will be removed. To remove only a single space item, use `-removeItemAtIndex:` instead.
+ 
+ Any change made will be propagated immediately to all other toolbars with the same identifier.
+ */
+- (void)removeItemWithItemIdentifier:(NSToolbarItemIdentifier)itemIdentifier API_AVAILABLE(macos(15.0), ios(18.0)) NS_SWIFT_NAME(removeItem(identifier:));
+
+/**
+ Customizable toolbars must have a delegate, and must implement the required `NSToolbarDelegate` methods.
+ */
 @property (nullable, weak) id<NSToolbarDelegate> delegate;
 
-/* toggles the visibility of the toolbar. This property is KVO compliant on macOS 14.0 and higher. */
+/**
+ Toggles the visibility of the toolbar.
+ This property may be modified by the user in toolbars with `allowsUserCustomization` enabled.
+ This property is key value observable on macOS 14.0 and higher.
+ */
 @property (getter=isVisible) BOOL visible;
 
-/* Customizable toolbars (those with delegates) can show a palette which allows users to populate the toolbar with individual items or to reset the toolbar to some default set of items.  The items and item sets in the palette are specified by the delegate (-toolbarAllowedItemIdentifiers: and -toolbarDefaultItemIdentifiers:).  When the user is done configuring, they will dismiss the palette. */
+/**
+ Customizable toolbars (those with delegates) can show a palette which allows users to populate the toolbar with individual items or to reset the toolbar to some default set of items.
+ The items and item sets in the palette are specified by the delegate (`-toolbarAllowedItemIdentifiers:` and `-toolbarDefaultItemIdentifiers:`).
+ When the user is done configuring, they will dismiss the palette.
+ */
 - (void)runCustomizationPalette:(nullable id)sender;
+
+/**
+ Whether or not the customization palette is currently running.
+ On macOS 15.0 and above this property is key value observable.
+ */
 @property (readonly) BOOL customizationPaletteIsRunning;
 
 
-// ----- Toolbar Attributes  -----
+# pragma mark - Toolbar Attributes
 
+/**
+ The current display mode of items in the toolbar.
+ In toolbars with `allowsDisplayModeCustomization` enabled this is a user modifiable property.
+ This property is key value observable.
+ */
 @property NSToolbarDisplayMode displayMode;
 
-/* Sets the toolbar's selected item by identifier.  Use this to force an item identifier to be selected.  Toolbar manages selection of image items automatically.  This method can be used to select identifiers of custom view items, or to force a selection change.  (see toolbarSelectableItemIdentifiers: delegate method for more details). */
+/**
+ Sets the toolbar's selected item by identifier.
+ Use this to force an item identifier to be selected.
+ Toolbar manages selection of image items automatically.
+ This method can be used to select identifiers of custom view items, or to force a selection change.
+ See `-toolbarSelectableItemIdentifiers:` delegate method for more details.
+ This property is key value observable.
+ */
 @property (nullable, copy) NSToolbarItemIdentifier selectedItemIdentifier;
 
-@property NSToolbarSizeMode sizeMode API_UNAVAILABLE(ios) API_DEPRECATED("NSToolbarSizeMode is no longer recommended and will be ignored in the future", macos(10.0, API_TO_BE_DEPRECATED));
-
-/* Use this API to hide the baseline NSToolbar draws between itself and the main window contents.  The default is YES.  This method should only be used before the toolbar is attached to its window (-[NSWindow setToolbar:]).
-*/
-@property BOOL showsBaselineSeparator;
-
-/* This flag controls whether or not users can configure the toolbar by dragging items around, and whether or not the customization palette can be used.  The default value is NO, but can be changed at any time.  For instance, a developer may not want users to be able to edit the toolbar while some event is being processed.  */
+/**
+ This flag controls whether or not users can configure the toolbar by dragging items around, and whether or not the customization palette can be used.
+ The default value is NO, but can be changed at any time.
+ For instance, a developer may not want users to be able to edit the toolbar while some event is being processed.
+ */
 @property BOOL allowsUserCustomization;
 
+/**
+ Whether or not the user is allowed to change display modes at run time.
+ This functionality is independent of customizing the order of the items themselves.
+ Only disable when the functionality or legibility of your toolbar could not be improved by another display mode.
+ The user's selection will be persisted using the toolbar's `identifier` when `autosavesConfiguration` is enabled.
+ The default is YES for apps linked on macOS 15.0 and above.
+ */
+@property BOOL allowsDisplayModeCustomization API_AVAILABLE(macos(15.0), ios(18.0));
 
-// ----- Accessing toolbar info -----
 
-/* All toolbars with the same name will share the same display attributes, and item order.  Also, if a toolbar autosaves its configuration, the item identifier will be used as the autosave name. */
+# pragma mark - Accessing toolbar info
+
+/**
+ All toolbars with the same name will share the same display attributes, and item order.
+ If a toolbar autosaves its configuration, the item identifier will be used as the autosave name.
+ */
 @property (readonly, copy) NSToolbarIdentifier identifier;
 
-/* Allows you to access all current items in the toolbar. */
+/**
+ Allows you to access all current items in the toolbar.
+ */
 @property (readonly, copy) NSArray<__kindof NSToolbarItem *> *items;
 
-/* Allows you to access the current visible items (non clipped). */
+/**
+ Allows you to access the current visible items (non clipped).
+ */
 @property (nullable, readonly, copy) NSArray<__kindof NSToolbarItem *> *visibleItems;
 
 /**
- Items with centered identifiers will be centered together in the Toolbar relative to the window assuming space allows. The order of items is initially defined by the default set of identifiers, but may be customized by the user. Centered items may not be moved outside of the center set of items by the user.
- 
- This property is archived.
+ An array of itemIdentifiers that represent the current items in the toolbar.
+ Setting this property will set the current items in the toolbar by diffing against items that already exist.
+ Use this with great caution if `allowsUserCustomization` is enabled as it will override any customizations the user has made.
+ This property is key value observable.
  */
-@property (copy) NSSet<NSToolbarItemIdentifier> *centeredItemIdentifiers API_AVAILABLE(macos(13.0), ios(16.0));
+@property (copy) NSArray<NSToolbarItemIdentifier> *itemIdentifiers API_AVAILABLE(macos(15.0), ios(18.0));
 
-/*
- The item with the specified identifier will be positioned in the absolute center of the Toolbar relative to the window assuming space allows. When the window shrinks, the highest priority is to have the most items visible. Thus, centering is broken first (it'll be pushed off to the left/right as necessary). Next, items will be shrunk down a little at a time towards their min size, at the same rate. Finally, items will be removed based on their visibility priority.
- 
+/**
+ Items with centered identifiers will be centered together in the Toolbar relative to the window assuming space allows.
+ The order of items is initially defined by the default set of identifiers, but may be customized by the user.
+ Centered items may not be moved outside of the center set of items by the user.
  This property is archived.
  */
-@property (nullable, copy) NSToolbarItemIdentifier centeredItemIdentifier API_DEPRECATED("Use the centeredItemIdentifiers property instead", macos(10.14, API_TO_BE_DEPRECATED));
+@property (copy) NSSet<NSToolbarItemIdentifier> *centeredItemIdentifiers API_AVAILABLE(macos(13.0), ios(16.0));
 
 
-// ----- Autosaving The Configuration -----
+# pragma mark - Autosaving The Configuration
 
-/* If autosavesConfiguration is YES, the toolbar will automatically write changes the user makes to user defaults.  Customizable toolbars will want to set this flag to YES.  Setting this to NO means changes in configuration are not written automatically, however you can use the configurationDictionary method to do it yourself.  Default is NO. */
+/**
+ If `autosavesConfiguration` is YES, the toolbar will automatically write changes the user makes to user defaults.
+ Customizable toolbars will want to set this flag to YES.
+ Setting this to NO means changes in configuration are not written automatically, however you can use the `configurationDictionary` method to do it yourself.
+ Default is NO.
+ */
 @property BOOL autosavesConfiguration;
 
-/* Set and get the current toolbar configuration using a dictionary representation. */
-- (void)setConfigurationFromDictionary:(NSDictionary<NSString *, id> *)configDict API_UNAVAILABLE(ios);
-@property (readonly, copy) NSDictionary<NSString *, id> *configurationDictionary API_UNAVAILABLE(ios);
 
+# pragma mark - Item Validation
 
-// ----- Validation of the items -----
-
-/* Typically you should not invoke this method.  This method is called on window updates with the purpose of validating 
- each of the visible items.  The toolbar will iterate through the list of visible items, sending each a -validate message.
- If this method is invoked directly, all visible items including those with autovalidates disabled will get a -validate message. */
+/**
+ Typically you should not invoke this method.
+ This method is called on window updates with the purpose of validating each of the visible items.
+ The toolbar will iterate through the list of visible items, sending each a `-validate` message.
+ If this method is invoked directly, all visible items including those with `autovalidates` disabled will get a `-validate` message.
+ */
 - (void)validateVisibleItems API_UNAVAILABLE(ios);
 
-// ----- Extension toolbar items -----
-/* When YES, the receiver can dynamically create toolbar items for Action extensions in the toolbar configuration panel. To be included, an extension needs to declare NSExtensionServiceAllowsToolbarItem=YES in its Info.plist. The default value is NO.
+
+# pragma mark - Extension toolbar items
+
+/**
+ When YES, the receiver can dynamically create toolbar items for Action extensions in the toolbar configuration panel.
+ To be included, an extension needs to declare NSExtensionServiceAllowsToolbarItem=YES in its Info.plist.
+ The default value is NO.
 */
 @property BOOL allowsExtensionItems API_AVAILABLE(macos(10.10)) API_UNAVAILABLE(ios);
 
 @end
 
+# pragma mark - Delegate
+
 API_AVAILABLE(ios(13.0))
 @protocol NSToolbarDelegate <NSObject>
 
-/*The following three methods are required for toolbars that are not created in Interface Builder.  If the toolbar is created in IB, you may omit them.  If you do implement them, any  items returned by the delegate will be used alongside items created in Interface Builder. */
+/**
+ The following three methods are required for toolbars that are not created in Interface Builder.
+ If the toolbar is created in IB, you may omit them.
+ If you do implement them, any items returned by the delegate will be used alongside items created in Interface Builder.
+ */
 @optional
 
-/* Given an item identifier, this method returns an item.  Note that, it is expected that each toolbar receives its own distinct copies.   If the item has a custom view, that view should be in place when the item is returned.  Finally, do not assume the returned item is going to be added as an active item in the toolbar.  In fact, the toolbar may ask for items here in order to construct the customization palette (it makes copies of the returned items).  if willBeInsertedIntoToolbar is YES, the returned item will be inserted, and you can expect toolbarWillAddItem: is about to be posted.  */
+/**
+ Given an item identifier, this method returns an item.
+ Note that it is expected that each toolbar receives its own distinct copies and each time this method is called a new item must be returned.
+ If the item has a custom view, that view should be in place when the item is returned.
+ Finally, do not assume the returned item is going to be added as an active item in the toolbar.
+ In fact, the toolbar may ask for items here in order to construct the customization palette.
+ If `willBeInsertedIntoToolbar` is YES, the returned item will be inserted, and you can expect `toolbarWillAddItem:` is about to be posted.
+ */
 - (nullable NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSToolbarItemIdentifier)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag NS_SWIFT_UI_ACTOR;
     
-/* Returns the ordered list of items to be shown in the toolbar by default.   If during initialization, no overriding values are found in the user defaults, or if the user chooses to revert to the default items this set will be used. */
+/**
+ Returns the ordered list of items to be shown in the toolbar by default.
+ If during initialization, no overriding values are found in the user defaults, or if the user chooses to revert to the default items this set will be used.
+ */
 - (NSArray<NSToolbarItemIdentifier> *)toolbarDefaultItemIdentifiers:(NSToolbar *)toolbar NS_SWIFT_UI_ACTOR;
 
-/* Returns the list of all allowed items by identifier.  By default, the toolbar does not assume any items are allowed, even the separator.  So, every allowed item must be explicitly listed.  The set of allowed items is used to construct the customization palette.  The order of items does not necessarily guarantee the order of appearance in the palette.  At minimum, you should return the default item list.*/
+/**
+ Returns the list of all allowed items by identifier.
+ By default, the toolbar does not assume any items are allowed so every allowed item must be explicitly listed.
+ The set of allowed items is used to construct the customization palette.
+ The order of items does not necessarily guarantee the order of appearance in the palette.
+ At minimum, you should return the default item list.
+ */
 - (NSArray<NSToolbarItemIdentifier> *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar NS_SWIFT_UI_ACTOR;
 
 @optional
 
-/* Optional method. Those wishing to indicate item selection in a toolbar should implement this method to return a non-empty array of selectable item identifiers.  If implemented, the toolbar will remember and display the selected item with a special highlight.  A selected item is one whose item identifier matches the current selected item identifier.  Clicking on an item whose identifier is selectable will automatically update the toolbar's selectedItemIdentifier when possible. (see setSelectedItemIdentifier: for more details) */
+/**
+ Optional method.
+ Those wishing to indicate item selection in a toolbar should implement this method to return a non-empty array of selectable item identifiers.
+ If implemented, the toolbar will remember and display the selected item with a special highlight.
+ A selected item is one whose item identifier matches the current selected item identifier.
+ Clicking on an item whose identifier is selectable will automatically update the toolbar's `selectedItemIdentifier` when possible.
+ See `selectedItemIdentifier` for more details.
+ */
 - (NSArray<NSToolbarItemIdentifier> *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar NS_SWIFT_UI_ACTOR;
 
-/// Items in this set cannot be dragged or removed by the user
+/**
+ Items in this set cannot be dragged or removed by the user.
+ */
 - (NSSet<NSToolbarItemIdentifier> *)toolbarImmovableItemIdentifiers:(NSToolbar *)toolbar NS_SWIFT_UI_ACTOR API_AVAILABLE(macos(13.0), ios(16.0));
 
-/// Whether or not an item can be moved to a specified position in the toolbar. If implemented, this method will be called during a user drag and does not necessarily indicate the final position of an item. An index of NSNotFound indicates the item would be removed from the toolbar
+/**
+ Whether or not an item can be moved to a specified position in the toolbar.
+ If implemented, this method will be called during a user drag and does not necessarily indicate the final position of an item.
+ An index of NSNotFound indicates the item would be removed from the toolbar.
+ */
 - (BOOL)toolbar:(NSToolbar *)toolbar itemIdentifier:(NSToolbarItemIdentifier)itemIdentifier canBeInsertedAtIndex:(NSInteger)index NS_SWIFT_UI_ACTOR API_AVAILABLE(macos(13.0), ios(16.0));
 
-    /* Notifications */
 
-/* Before a new item is added to the toolbar, this notification is posted.  This is the best place to notice a new item is going into the toolbar.  For instance, if you need to cache a reference to the toolbar item or need to set up some initial state, this is the best place to do it.   The notification object is the toolbar to which the item is being added.  The item being added is found by referencing the NSToolbarItemKey in the userInfo.  */
+# pragma mark - Notifications
+
+/**
+ Before a new item is added to the toolbar, this notification is posted.
+ This is the best place to notice a new item is going into the toolbar.
+ For instance, if you need to cache a reference to the toolbar item or need to set up some initial state, this is the best place to do it.
+ The notification object is the toolbar to which the item is being added.
+ The item being added and its new index can be found by referencing `NSToolbarItemKey` and `NSToolbarNewIndexKey` in the userInfo dictionary respectively.
+ */
 - (void)toolbarWillAddItem:(NSNotification *)notification NS_SWIFT_UI_ACTOR;
 
-/* After an item is removed from a toolbar the notification is sent.  This allows the chance to tear down information related to the item that may have been cached.  The notification object is the toolbar from which the item is being removed.  The item being removed is found by referencing the NSToolbarItemKey in the userInfo.  */
+/**
+ After an item is removed from a toolbar the notification is sent.
+ This allows the chance to tear down information related to the item that may have been cached.
+ The notification object is the toolbar from which the item is being removed.
+ The item being removed is found by referencing the `NSToolbarItemKey` in the userInfo.
+ */
 - (void)toolbarDidRemoveItem:(NSNotification *)notification NS_SWIFT_UI_ACTOR;
 
 @end
 
-/* Notifications */
+/** Notifications */
 APPKIT_EXTERN NSNotificationName NSToolbarWillAddItemNotification API_AVAILABLE(ios(13.0));
 APPKIT_EXTERN NSNotificationName NSToolbarDidRemoveItemNotification API_AVAILABLE(ios(13.0));
 
@@ -168,20 +291,14 @@
 
 @interface NSToolbar(NSDeprecated)
 
-/*
- Sets the toolbar full screen accessory view.  When entering full screen, the accessory view is removed from the window if necessary, and attaches underneath the toolbar.  When leaving full screen, the accessory view is returned to the window, if it was in the window previously. To customize this latter behavior, you can implement the NSWindow delegate method windowWillExitFullScreen:.
- */
+@property NSToolbarSizeMode sizeMode API_UNAVAILABLE(ios) API_DEPRECATED("NSToolbarSizeMode is no longer recommended and will be ignored in the future", macos(10.0, API_TO_BE_DEPRECATED));
+@property (nullable, copy) NSToolbarItemIdentifier centeredItemIdentifier API_DEPRECATED("Use the centeredItemIdentifiers property instead", macos(10.14, API_TO_BE_DEPRECATED), ios(13.0, API_TO_BE_DEPRECATED));
 @property (nullable, strong) NSView *fullScreenAccessoryView API_DEPRECATED("Use NSTitlebarAccessoryViewController with NSWindow instead", macos(10.7,10.13));
-
-/*
- The following properties control the minimum and maximum height of the accessory view. The minimum height is used when the menu bar is hidden, and the max height to a fully revealed menu bar. During the reveal, the accessory view's frame is interpolated between its minimum and maximum height.
- 
- If the minimum height is zero (which it is by default), the accessory view is not resized; instead a special transition is used to reveal it with the menu bar. This simplifies the accessory view's task, because it does not have to handle the case of being set to zero height. To create a fixed-height accessory view, set the min and max height to be equal.
- 
- By default, the min height is 0 and the max height gets set to the height of the accessory view's frame when it is set.
- */
 @property CGFloat fullScreenAccessoryViewMinHeight API_DEPRECATED("Use NSTitlebarAccessoryViewController and its fullScreenMinHeight property with NSWindow instead.", macos(10.7,10.13));
 @property CGFloat fullScreenAccessoryViewMaxHeight API_DEPRECATED("Use NSTitlebarAccessoryViewController with NSWindow instead. The max height of a titlebar accessory is implied by its view's height.", macos(10.7,10.13));
+@property BOOL showsBaselineSeparator API_DEPRECATED("No longer supported", macos(10.0, 15.0));
+@property (readonly, copy) NSDictionary<NSString *, id> *configurationDictionary API_DEPRECATED("Use -itemIdentifiers and -displayMode instead.", macos(10.0, 15.0));
+- (void)setConfigurationFromDictionary:(NSDictionary<NSString *, id> *)configDict API_DEPRECATED("Use -setItemIdentifiers: and -setDisplayMode: instead.", macos(10.0, 15.0));
 
 @end
 
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbarItem.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbarItem.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbarItem.h	2024-04-25 05:49:36
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbarItem.h	2024-06-01 03:52:51
@@ -33,66 +33,112 @@
 API_AVAILABLE(ios(13.0)) NS_SWIFT_UI_ACTOR
 @interface NSToolbarItem : NSObject <NSCopying>
 
-/* Initialize the toolbar item with an identifier which is a development language string used by the toolbar and its delegate for identification purposes.  */
+/**
+ Initialize the toolbar item with an identifier which is a development language string used by the toolbar and its delegate for identification purposes.
+ */
 - (instancetype)initWithItemIdentifier:(NSToolbarItemIdentifier)itemIdentifier NS_DESIGNATED_INITIALIZER;
 @property (readonly, copy) NSToolbarItemIdentifier itemIdentifier;
 
-/* Use this to determine the toolbar in which an item is currently displayed. */
+/**
+ Use this to determine the toolbar in which an item is currently displayed.
+ */
 @property (readonly, nullable, weak) NSToolbar *toolbar;
 
-// ----- Setters and Getters -----
 
-/* Use this to set the item's label that appears in the toolbar.  The implication here is that the toolbar will draw the label for the item, and a redraw is triggered by this method.  The toolbar is in charge of the label area.  It is fine for an item to have no toolbar label.  Also, developers should make sure the length of the label is appropriate and not too long.  */
+# pragma mark - Setters and Getters
+
+/**
+ Use this to set the item's label that appears in the toolbar.
+ The label may also be used for the default `menuFormRepresentation` of the item.
+ Also, developers should make sure the length of the label is appropriate and not too long.
+ */
 @property (copy) NSString *label;
 
-/* Use this to set the item's label that appears when the item is in the customization palette.  All Items must have a palette label, and for most things it is reasonable to set them to the same string as the label used in the toolbar. */
+/**
+ Use this to set the item's label that appears when the item is in the customization palette.
+ All Items must have a palette label, and for most things it is reasonable to set them to the same string as the label used in the toolbar.
+ */
 @property (copy) NSString *paletteLabel;
 
 /**
- An array of all alternate labels this item may display. The item will use the size of the longest label to prevent resizing when the label is changed.
+ An array of all alternate labels this item may display.
+ The item will use the size of the longest label to prevent resizing when the label is changed.
  */
 @property (copy) NSSet<NSString *> *possibleLabels API_AVAILABLE(macos(13.0));
 
-/* Use this to set a tooltip to be used when the item is displayed in the toolbar.  (forwards to -view if it responds) */
+/**
+ Use this to set a tooltip to be used when the item is displayed in the toolbar. (forwards to `-view` if it responds)
+ */
 @property (nullable, copy) NSString *toolTip;
 
-/* The menu form of a toolbar item's purpose is twofold.  First, when the window is too small to display an item, it will be clipped but remain accessible from a "clipped items" menu containing the menu item returned here.  Second, in text only mode, the menu returned will be used to create the displayed items.  Singleton menu items will be clickable, while submenu items will be represented as a pull down.  For instance, say you want a button that allows you to switch between modes A, B, and C.  You could represent this as a menu by :  a menu item "mode" with three submenu items "A", "B", and "C".   By default, this method returns a singleton menu item with item label as the title.  For standard items, the target, action is set.  */
+/**
+ The menu form of a toolbar item's purpose is twofold.
+ First, when the window is too small to display an item, it will be clipped but remain accessible from a "clipped items" menu containing the menu item returned here.
+ Second, in text only mode, the menu returned will be used to create the displayed items.
+ Singleton menu items will be clickable, while submenu items will be represented as a pull down.
+ For instance, say you want a button that allows you to switch between modes A, B, and C.
+ You could represent this as a menu by: a menu item "mode" with three submenu items "A", "B", and "C".
+ By default, this method returns a singleton menu item with item label as the title.
+ For standard items, the target, action is set.
+ */
 @property (nullable, strong) NSMenuItem *menuFormRepresentation API_UNAVAILABLE(ios);
 
-/* Tag for your own custom purpose. (forwards to -view if it responds) */ 
+/**
+ Tag for your own custom purpose. (forwards to `-view` if it responds)
+ */
 @property NSInteger tag;
 
-/* Set and get the action of an item. (forwards to -view if it responds) */
+/**
+ Set and get the action of an item. (forwards to `-view` if it responds)
+ */
 @property (nullable, weak) id target;
 
-/* Set and get the action of an item. For custom views, this method will call setAction:/action on the view if it responds. (forwards to -view if it responds) */
+/**
+ Set and get the action of an item.
+ For custom views, this method will call `-setAction:` on the view if it responds. (forwards to `-view` if it responds)
+ */
 @property (nullable) SEL action;
 
-/* Set and get the enabled flag of an item.  For custom views, this method will call setEnabled:/isEnabled on the view if it responds. (forwards to -view if it responds) */
+/**
+ Set and get the enabled flag of an item.
+ For custom views, this method will call `-setEnabled:` on the view if it responds. (forwards to `-view` if it responds)
+ */
 @property (getter=isEnabled) BOOL enabled;
 
-/* Set and get the image of an item.  For custom views, this method will call setImage:/image on the view if it responds. (forwards to -view if it responds) */
+/**
+ Set and get the image of an item.
+ For custom views, this method will call `-setImage:` on the view if it responds. (forwards to `-view` if it responds)
+ */
 #if !TARGET_OS_IPHONE
 @property (nullable, strong) NSImage *image;
 #else
 @property (nullable, strong) UIImage *image API_AVAILABLE(ios(13.0));
 #endif
 
-/* Set and get the title of an item. For custom views, this method will call setTitle:/title on the view if it responds. (forwards to -view if it responds) */
+/**
+ Set and get the title of an item.
+ For custom views, this method will call `-setTitle:` on the view if it responds. (forwards to `-view` if it responds)
+ */
 @property (copy) NSString *title API_AVAILABLE(macos(10.15), ios(13.0));
 
-/*
+/**
  When set on an item without a custom view, the button produced will have a bordered style.
  Defaults to NO.
  */
 @property (getter=isBordered) BOOL bordered API_AVAILABLE(macos(10.15), ios(13.0));
 
-/*
-Whether or not the item behaves as a navigation item (i.e. back/forward) in the toolbar. Navigation items may be specially positioned by the system outside the normal list of items of the toolbar in the order specified by -toolbarDefaultItemIdentifiers:.
+/**
+ Whether or not the item behaves as a navigation item (i.e. back/forward) in the toolbar.
+ Navigation items may be specially positioned by the system outside the normal list of items of the toolbar in the order specified by `-toolbarDefaultItemIdentifiers:`.
+ Defaults to NO.
  */
 @property (getter=isNavigational) BOOL navigational API_AVAILABLE(macos(11.0), ios(14.0));
 
-/* Use setView: if you want your toolbar item to use something other than the standard.  Note that, by default, many of the set/get methods will be implemented by calls forwarded to the view you set, if it responds to it. */
+/**
+ Items with automatically generated views will return nil from this getter.
+ Custom views may be provided but not all `NSToolbarItem` subclasses support custom views.
+ Note that, by default, many of the set/get methods will be implemented by calls forwarded to the view you set, if it responds to it.
+ */
 @property (nullable, strong) NSView *view API_UNAVAILABLE(ios);
 
 /**
@@ -101,7 +147,12 @@
  */
 @property (readonly, getter=isVisible) BOOL visible API_AVAILABLE(macos(12.0), ios(16.0));
 
-/*
+/**
+ When an item is hidden it will not be visible in the toolbar. The item will still be visible in the customization panel. Because hidden items may be visible during user customization, use the `visible` property to determine if an item is currently displayed. Note that even hidden toolbar items are sync'd to other toolbars with a shared identifier, but its `hidden` state can be unique to each instance. Use this property to show a toolbar item in one toolbar instance but not another.
+ */
+@property (getter=isHidden) BOOL hidden API_AVAILABLE(macos(15.0), ios(18.0));
+
+/**
  Unless you have already set your own custom view, you should not call these methods.
  The min size should be small enough to look nice in all display modes.
  If you do not set a min/max size, the view's size properties will be calculated using constraints. Apps linked before 10.14 will use the view's current size.
@@ -110,26 +161,43 @@
 @property NSSize minSize API_DEPRECATED("This property is no longer recommended. Instead, let the system automatically measure the size of the view using constraints.", macos(10.0, 12.0)) API_UNAVAILABLE(ios);
 @property NSSize maxSize API_DEPRECATED("This property is no longer recommended. Instead, let the system automatically measure the size of the view using constraints.", macos(10.0, 12.0)) API_UNAVAILABLE(ios);
 
-/* When a toolbar does not have enough space to fit all its items, it must push some into the overflow menu.  Items with the highest visibility priority level are choosen last for the overflow menu.  The default visibilityPriority value is NSToolbarItemVisibilityPriorityStandard.  To suggest that an item always remain visible, give it a value greater than NSToolbarItemVisibilityPriorityStandard, but less than NSToolbarItemVisibilityPriorityUser.   In 10.7, users can no longer modify the toolbar item visibility priority. */
+/**
+ When a toolbar does not have enough space to fit all its items, it must push some into the overflow menu.
+ Items with the highest `visibilityPriority` level are chosen last for the overflow menu.
+ The default `visibilityPriority` value is `NSToolbarItemVisibilityPriorityStandard`.
+ To suggest that an item always remain visible, give it a value greater than `NSToolbarItemVisibilityPriorityStandard`, but less than `NSToolbarItemVisibilityPriorityUser`.
+ In 10.7, users can no longer modify the toolbar item visibility priority.
+ */
 @property NSToolbarItemVisibilityPriority visibilityPriority;
 
 
-// ----- Validation of the items -----
+# pragma mark - Validation of the items
 
-/* Typically you should not invoke this method.  This method is called by its toolbar during validation.  Standard items validate themselves by sending the validateToolbarItem: validate message to the current validator.  Since items with custom views don't always have meaningful target/actions, they do nothing.  So for your custom items it may be useful to override this method and invent your own validation. */
+/**
+ Typically you should not invoke this method.
+ This method is called by its toolbar during validation.
+ Standard items validate themselves by sending the `-validateToolbarItem:` validate message to the current validator.
+ Since items with custom views don't always have meaningful target/actions, they do nothing.
+ So for your custom items it may be useful to override this method and invent your own validation.
+ */
 - (void)validate API_AVAILABLE(ios(13.0));
 
 
-/* This property only affects automatic validation performed by NSToolbar. Explicit validation requests, such as the `-[NSToolbar validateVisibleItems]` method, will invoke the `-validate` method even if `autovalidates` is `NO`. */
+/**
+ This property only affects automatic validation performed by NSToolbar.
+ Explicit validation requests, such as the `-[NSToolbar validateVisibleItems]` method, will invoke the `-validate` method even if `autovalidates` is `NO`.
+ Defaults to YES.
+ */
 @property BOOL autovalidates API_AVAILABLE(ios(13.0));
 
 
+# pragma mark - Controlling Duplicates In The Toolbar
 
-// ----- Controlling Duplicates In The Toolbar -----
+/**
+ Duplicate items outside of spaces are not allowed.
+ */
+@property (readonly) BOOL allowsDuplicatesInToolbar API_UNAVAILABLE(ios) API_DEPRECATED("Duplicates are no longer supported.", macos(10.0, 15.0));
 
-/* Return YES to allow dragging duplicate items into the toolbar.  By default, if an item with the same identifier is already in the toolbar, dragging in will act as a move of this item.  However, for instance, the separator item drags in as a duplicate always. */
-@property (readonly) BOOL allowsDuplicatesInToolbar API_UNAVAILABLE(ios);
-
 @end
 
 #if !TARGET_OS_IPHONE
@@ -141,7 +209,10 @@
 
 @protocol NSToolbarItemValidation <NSObject>
 
-/* NSToolbarItemValidation extends the standard validation idea by introducing this new method which is sent to validators for each visible standard NSToolbarItem with a valid target/action pair.  Note: This message is sent from NSToolbarItem's validate method, however validate will not send this message for items that have custom views. */
+/**
+ `NSToolbarItemValidation` extends the standard validation idea by introducing this new method which is sent to validators for each visible standard `NSToolbarItem` with a valid target/action pair.
+ Note: This message is sent from NSToolbarItem's validate method, however validate will not send this message for items that have custom views.
+ */
 - (BOOL)validateToolbarItem:(NSToolbarItem *)item NS_SWIFT_UI_ACTOR;
 
 @end
@@ -154,48 +225,59 @@
 
 @protocol NSCloudSharingValidation <NSObject>
 
-/* NSToolbarItems created with NSToolbarCloudSharingItemIdentifier use this method for further validation after sending `-validateToolbarItem:` or `-validateUserInterfaceItem:`. The validator for the item's action should return the current CKShare corresponding to the selected item, if any. The state of the item will be changed reflect the state of the CKShare. */
+/**
+ `NSToolbarItems` created with `NSToolbarCloudSharingItemIdentifier` use this method for further validation after sending `-validateToolbarItem:` or `-validateUserInterfaceItem:`.
+ The validator for the item's action should return the current CKShare corresponding to the selected item, if any.
+ The state of the item will be changed reflect the state of the CKShare.
+ */
 - (nullable CKShare *)cloudShareForUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)item NS_SWIFT_UI_ACTOR;
 
 @end
 
 #endif
 
-/*
- These are the standard toolbar item identifiers that AppKit will automatically create when they appear in the default or allowed item sets. As such, the delegate method -toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar: will not be called for these items.
+/**
+ These are the standard toolbar item identifiers that AppKit will automatically create when they appear in the default or allowed item sets.
+ As such, the delegate method `-toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:` will not be called for these items.
  */
 
-/* A space item of a standard fixed size. */
+/** A space item of a standard fixed size. */
 APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarSpaceItemIdentifier API_AVAILABLE(ios(13.0));
 
-/* A space item of flexible width. */
+/** A space item of flexible width. */
 APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarFlexibleSpaceItemIdentifier API_AVAILABLE(ios(13.0));
 
-/* A standard item that is configured to show the color panel when invoked. */
+/** A standard item that is configured to show the color panel when invoked. */
 APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarShowColorsItemIdentifier API_AVAILABLE(ios(13.0));
 
-/* A standard item that is configured to show the font panel when invoked. */
+/** A standard item that is configured to show the font panel when invoked. */
 APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarShowFontsItemIdentifier API_AVAILABLE(ios(13.0));
 
-/* A standard item that is configured to send -printDocument: to the firstResponder when invoked */
+/** A standard item that is configured to send -printDocument: to the firstResponder when invoked */
 APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarPrintItemIdentifier API_AVAILABLE(ios(13.0));
 
-/* A standard item that is configured to send -toggleSidebar: to the firstResponder when invoked. */
+/** A standard item that is configured to send -toggleSidebar: to the firstResponder when invoked. */
 APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarToggleSidebarItemIdentifier API_AVAILABLE(macos(10.11), ios(13.0));
 
-/* A standard item that is configured to send -toggleInspector: to the firstResponder when invoked. */
+/** A standard item that is configured to send -toggleInspector: to the firstResponder when invoked. */
 APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarToggleInspectorItemIdentifier API_AVAILABLE(macos(14.0), ios(17.0));
 
-/* A standard item for cloud sharing via NSSharingServiceNameCloudSharing. It validates itself and modifies its appearance by using the NSCloudSharingValidation protocol. It sends -performCloudSharing: to the firstResponder. */
+/** A standard item for cloud sharing via NSSharingServiceNameCloudSharing. It validates itself and modifies its appearance by using the NSCloudSharingValidation protocol. It sends -performCloudSharing: to the firstResponder. */
 APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarCloudSharingItemIdentifier API_AVAILABLE(macos(10.12));
 
-/* Creates a new NSTrackingSeparatorToolbarItem and automatically configures it to track the divider of the sidebar if one is discovered. */
+/**
+ Creates a new NSTrackingSeparatorToolbarItem and automatically configures it to track the divider of the sidebar if one is discovered.
+ Only applies to windows with `NSWindowStyleMaskFullSizeContentView` applied.
+ */
 APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarSidebarTrackingSeparatorItemIdentifier API_AVAILABLE(macos(11.0)) API_UNAVAILABLE(ios);
 
-/* Creates a new NSTrackingSeparatorToolbarItem and automatically configures it to track the divider of the inspector if one is discovered. */
+/**
+ Creates a new NSTrackingSeparatorToolbarItem and automatically configures it to track the divider of the inspector if one is discovered.
+ Only applies to windows with `NSWindowStyleMaskFullSizeContentView` applied.
+ */
 APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarInspectorTrackingSeparatorItemIdentifier API_AVAILABLE(macos(14.0)) API_UNAVAILABLE(ios);
 
-/*
+/**
  Deprecated Item Identifiers
  */
 APPKIT_EXTERN NSToolbarItemIdentifier NSToolbarSeparatorItemIdentifier API_DEPRECATED("This item is no longer recommended and will be ignored on 10.7 and later.", macos(10.0, 11.0)) API_UNAVAILABLE(ios);
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbarItemGroup.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbarItemGroup.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbarItemGroup.h	2024-04-25 05:49:41
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSToolbarItemGroup.h	2024-06-01 03:52:56
@@ -13,9 +13,10 @@
 @class UIImage;
 #endif
 
-/*
- NSToolbarItemGroup is a subclass of NSToolbarItem which can be used to create sets of NSToolbarItems that are always attached to one another and that are added, removed, or reordered as a single unit.  Properties that get set on the parent toolbar item, such as label or view, apply to the entire item.  Otherwise, the individual properties are displayed adjacent to one another.
-
+/**
+ `NSToolbarItemGroup` is a subclass of `NSToolbarItem` which can be used to create sets of `NSToolbarItems` that are always attached to one another and that are added, removed, or reordered as a single unit.
+ Properties that get set on the parent toolbar item, such as label or view, apply to the entire item.
+ Otherwise, the individual properties are displayed adjacent to one another.
  Subitems will inherit the group's action if no action is defined on the subitem and will validate based on that action when autovalidates is enabled.
  */
 
@@ -28,15 +29,15 @@
 } API_AVAILABLE(macos(10.15), ios(13.0));
 
 typedef NS_ENUM(NSInteger, NSToolbarItemGroupControlRepresentation) {
-    NSToolbarItemGroupControlRepresentationAutomatic,   // The representation will be chosen based on available space
-    NSToolbarItemGroupControlRepresentationExpanded,    // All functions of the control will be visible in a horizontal representation
-    NSToolbarItemGroupControlRepresentationCollapsed   // All functions of the control will be presented through a menu
+    NSToolbarItemGroupControlRepresentationAutomatic, // The representation will be chosen based on available space
+    NSToolbarItemGroupControlRepresentationExpanded,  // All functions of the control will be visible in a horizontal representation
+    NSToolbarItemGroupControlRepresentationCollapsed  // All functions of the control will be presented through a menu
 } API_AVAILABLE(macos(10.15), ios(13.0));
 
 API_AVAILABLE(macos(10.5), ios(13.0))
 @interface NSToolbarItemGroup : NSToolbarItem
 
-/*
+/**
  Convenience constructors for creating segmented control based toolbar items with images or text.
  The item returned will have a custom view for representing the control and automatically create subitems for the group.
  The labels array, if not nil, will be used to provide individual labels under the item for each segment of the control.
@@ -50,27 +51,32 @@
 + (instancetype)groupWithItemIdentifier:(NSToolbarItemIdentifier)itemIdentifier images:(NSArray<UIImage *> *)images selectionMode:(NSToolbarItemGroupSelectionMode)selectionMode labels:(nullable NSArray<NSString *> *)labels target:(nullable id)target action:(nullable SEL)action;
 #endif
 
-/* Set or get the array of subitems for the toolbar item.  By default, a NSToolbarItemGroup has an empty array of subitems.  You should call this to set the subitems before returning the item to the toolbar.  NSToolbarItemGroups may not contain other NSToolbarItemGroups as subitems.
+/**
+ Set or get the array of subitems for the toolbar item.
+ By default, a `NSToolbarItemGroup` has an empty array of subitems.
+ You should call this to set the subitems before returning the item to the toolbar.
+ `NSToolbarItemGroups` may not contain other `NSToolbarItemGroups` as subitems.
 */
 @property (copy) NSArray<__kindof NSToolbarItem *> *subitems;
 
-/*
+/**
  The style in which this item will be represented to the user.
- Defaults to NSToolbarItemGroupControlRepresentationAutomatic.
+ Defaults to `NSToolbarItemGroupControlRepresentationAutomatic`.
  */
 @property NSToolbarItemGroupControlRepresentation controlRepresentation API_AVAILABLE(macos(10.15));
 
-/*
+/**
  Get and set how selection is handled by the control.
+ Only applies when using one of the constructors to create the item with a system defined control representation.
  */
 @property NSToolbarItemGroupSelectionMode selectionMode API_AVAILABLE(macos(10.15));
 
-/*
+/**
  The most recently selected item of the group, or -1 if nothing is selected.
  */
 @property NSInteger selectedIndex API_AVAILABLE(macos(10.15));
 
-/*
+/**
  Get and set selection of individual subitems of the group item.
  */
 - (void)setSelected:(BOOL)selected atIndex:(NSInteger)index API_AVAILABLE(macos(10.15));
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTrackingSeparatorToolbarItem.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTrackingSeparatorToolbarItem.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTrackingSeparatorToolbarItem.h	2024-04-25 05:49:34
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTrackingSeparatorToolbarItem.h	2024-06-01 03:52:49
@@ -13,19 +13,22 @@
 
 API_AVAILABLE(macos(11.0)) API_UNAVAILABLE(ios)
 @interface NSTrackingSeparatorToolbarItem : NSToolbarItem
-/*
- Creates a new NSTrackingSeparatorToolbarItem and configures it to attempt to visually align with the specified divider of the splitView.
- The splitView must be in the same window as the toolbar containing this item by the time the toolbar is shown. Only vertical split views are supported.
+
+/**
+ Creates a new `NSTrackingSeparatorToolbarItem` and configures it to attempt to visually align with the specified divider of the `splitView`.
+ The `splitView` must be in the same window as the toolbar containing this item by the time the toolbar is shown.
+ Only vertical `splitViews` are supported.
  */
 + (instancetype)trackingSeparatorToolbarItemWithIdentifier:(NSToolbarItemIdentifier)identifier splitView:(NSSplitView *)splitView dividerIndex:(NSInteger)dividerIndex API_UNAVAILABLE(ios);
 
-/*
-    The splitView must be in the same window as the toolbar containing this item by the time the toolbar is shown. Only vertical split views are supported.
+/**
+ The `splitView` must be in the same window as the toolbar containing this item by the time the toolbar is shown.
+ Only vertical `splitViews` are supported.
 */
 @property (strong) NSSplitView *splitView API_UNAVAILABLE(ios);
 
-/*
-    The specific divider of the splitView which will be tracked.
+/**
+ The specific divider of the `splitView` which will be tracked.
 */
 @property NSInteger dividerIndex API_UNAVAILABLE(ios);
 
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSUserInterfaceValidation.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSUserInterfaceValidation.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSUserInterfaceValidation.h	2024-04-25 05:49:26
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSUserInterfaceValidation.h	2024-06-01 03:52:40
@@ -11,12 +11,12 @@
 /*
 This file defines the protocols used by AppKit's standard user interface validation mechanism.  The NSValidatedUserInterfaceItem protocol must be implemented by validated objects. The validated object should send a -validateUserInterfaceItem: message to its validator.  A validator can be determined by calling the -[NSApplication targetForAction:to:from:] method from the -update method in the validated object.
 
-You can extend this functionality by introducing a new set of protocols that are targeted to your specific validated objects.  NSMenuItem protocol is one example extending this validation machinary to allow validators to modify menu items being validated. These are the steps to extend UI validation:
+You can extend this functionality by introducing a new set of protocols that are targeted to your specific validated objects.  NSMenuItem protocol is one example extending this validation machinery to allow validators to modify menu items being validated. These are the steps to extend UI validation:
  
  1) Declare a subprotocol of NSValidatedUserInterfaceItem
     You can add as many features as you want for your validated objects in this protocol
     i.e.
-        @protocol NSValidatedToobarItem <NSValidatedUserInterfaceItem>
+        @protocol NSValidatedToolbarItem <NSValidatedUserInterfaceItem>
         - (NSImage *)image;
         - (void)setImage:(NSImage *)image
         - (NSString *)toolTip;
@@ -27,7 +27,7 @@
     You should declare your new selector that takes your object as the argument.
     i.e.
         @protocol NSToolbarItemValidation
-        - (BOOL)validateToolbarItem:(id <NSValidatedToobarItem>)item;
+        - (BOOL)validateToolbarItem:(id <NSValidatedToolbarItem>)item;
         @end
 
  3) Implement your -update method
@@ -54,7 +54,7 @@
     i.e.
         @implementation NSTextView (NSToolbarItemValidation)
     
-        - (BOOL)validateToolbarItem:(id <NSValidatedToobarItem>)item {
+        - (BOOL)validateToolbarItem:(id <NSValidatedToolbarItem>)item {
             BOOL returnValue = [self validateUserInterfaceItem:item];
 
             // Your own validation
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h	2024-04-25 05:49:38
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h	2024-06-01 03:52:53
@@ -81,13 +81,11 @@
  * @typedef NSWindowSharingType
  *
  * @const NSWindowSharingNone          Window contents may not be read by another process.
- * @const NSWindowSharingReadOnly   Window contents may be read but not modified by another process.
- * @const NSWindowSharingReadWrite  Window contents may be read or modified by another process.
+ * @const NSWindowSharingReadOnly   Window contents may be read by another process.
  */
 typedef NS_ENUM(NSUInteger, NSWindowSharingType) {
     NSWindowSharingNone = 0,
     NSWindowSharingReadOnly = 1,
-    NSWindowSharingReadWrite = 2
 } API_AVAILABLE(macos(10.5));
 
 /*!
@@ -238,7 +236,7 @@
  *
  * @const NSWindowToolbarStyleAutomatic The default value. The style will be determined by the window's given configuration.
  * @const NSWindowToolbarStyleExpanded The toolbar will appear below the window title.
- * @const NSWindowToolbarStylePreference The toolbar will appear below the window title and the items in the toolbar will attempt to have equal widths when possible.
+ * @const NSWindowToolbarStylePreference For Settings windows only. The toolbar will appear below the window title and the items in the toolbar will attempt to have equal widths when possible.
  * @const NSWindowToolbarStyleUnified The window title will appear inline with the toolbar when visible.
  * @const NSWindowToolbarStyleUnifiedCompact Same as \c NSWindowToolbarStyleUnified, but with reduced margins in the toolbar allowing more focus to be on the contents of the window.
  */
@@ -434,7 +432,7 @@
 @property (readonly) BOOL canBecomeKeyWindow;
 @property (readonly) BOOL canBecomeMainWindow;
 
-/*! Makes the window key and main if eligible, updating NSAppication's `-keyWindow` and `-mainWindow` properties.
+/*! Makes the window key and main if eligible, updating NSApplication's `-keyWindow` and `-mainWindow` properties.
  */
 - (void)makeKeyWindow;
 
@@ -512,7 +510,7 @@
 @property (getter=isOpaque) BOOL opaque;
 
 
-/*! `-setSharingType:` specifies whether the window content can be read and/or written from another process.  The default sharing type is \c NSWindowSharingReadOnly, which means other processes can read the window content (eg. for window capture) but cannot modify it.  If you set your window sharing type to \c NSWindowSharingNone, so that the content cannot be captured, your window will also not be able to participate in a number of system services, so this setting should be used with caution.  If you set your window sharing type to \c NSWindowSharingReadWrite, other processes can both read and modify the window content.
+/*! `-setSharingType:` specifies whether the window content can be read from another process.  The default sharing type is \c NSWindowSharingReadOnly, which means other processes can read the window content (eg. for window capture) but cannot modify it.  If you set your window sharing type to \c NSWindowSharingNone, so that the content cannot be captured, your window will also not be able to participate in a number of system services, so this setting should be used with caution.
 */
 @property NSWindowSharingType sharingType API_AVAILABLE(macos(10.5));
 
@@ -522,11 +520,6 @@
 
 @property BOOL displaysWhenScreenProfileChanges;
 
-/*!
- In recent macOS versions this method does not do anything and should not be called. 
- */
-- (void)disableScreenUpdatesUntilFlush;
-
 /*! This API controls whether the receiver is permitted onscreen before the user has logged in.  This property is off by default.  Alert panels and windows presented by input managers are examples of windows which should have this property set.
 */
 @property BOOL canBecomeVisibleWithoutLogin API_AVAILABLE(macos(10.5));
@@ -735,7 +728,7 @@
         A window that is replacing the reciever in representing the user's current activity.
      @param completionHandler
         A completion block that is called after the request finishes.
-        @param error
+        @c error
             In the event of a failed transfer request, a non-nil error contains details about the failure.
 */
 - (void)transferWindowSharingToWindow:(NSWindow *)window completionHandler:(void(^)(NSError * _Nullable error))completionHandler API_AVAILABLE(macos(13.3));
@@ -745,6 +738,30 @@
  */
 @property (readonly) BOOL hasActiveWindowSharingSession API_AVAILABLE(macos(13.3));
 
+/*!
+ @abstract Request sharing of window.  If there is an available ScreenCaptureKit sharing session, an alert will be presented asking the user to confirm the share
+ @param window
+ The window to share
+ @param completionHandler
+ A completion block that is called after the request finishes.
+ @c error
+ The error will be non-nil if the request does not result in a window being shared.  The error will be NSUserCancelledError if there is no ScreenCaptureKit session, or if the user rejects the offer to share.  If sharing fails for some other reason, the error will provide the details.
+ */
+- (void)requestSharingOfWindow:(NSWindow *)window completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(requestSharingOfWindow(_:completionHandler:)) API_AVAILABLE(macos(15.0));
+
+/*!
+ @abstract Request sharing of window to be provided later.  If there is an available ScreenCaptureKit sharing session, an alert will be presented asking the user to confirm the share.  The delegate will be asked to provide the window to share via windowForSharingRequestFromWindow:
+ @param image
+ An image showing a preview of the window to share
+ @param title
+ The title to show in a confirmation dialog
+ @param completionHandler
+ A completion block that is called after the request finishes.
+ @c error
+ The error will be non-nil if the request does not result in a window being shared.  The error will be NSUserCancelledError if there is no ScreenCaptureKit session, or if the user rejects the offer to share.  If sharing fails for some other reason, the error will provide the details.
+ */
+- (void)requestSharingOfWindowUsingPreview:(NSImage *)image title:(NSString *)title completionHandler:(void (^)(NSError * _Nullable error))completionHandler NS_SWIFT_NAME(requestSharingOfWindow(usingPreview:title:completionHandler:)) API_AVAILABLE(macos(15.0));
+
 #pragma mark - Other
 
 /*! Retrieve the layout direction of the window titlebar: this includes the standard window buttons (close/minimize/maximize buttons) and the title for this window. In general, this will return "right to left" (RTL) if the primary system language is RTL. The layout direction may be RTL even in applications that do not have a RTL language localization. This value should be utilized if an application uses titlebarAppearsTransparent and places controls underneath the titlebar.
@@ -781,23 +798,15 @@
 @end
 
 @interface NSWindow(NSDrag)
-- (void)dragImage:(NSImage *)image at:(NSPoint)baseLocation offset:(NSSize)initialOffset event:(NSEvent *)event pasteboard:(NSPasteboard *)pboard source:(id)sourceObj slideBack:(BOOL)slideFlag;
 
+- (NSDraggingSession *)beginDraggingSessionWithItems:(NSArray<NSDraggingItem *> *)items event:(NSEvent *)event source:(id<NSDraggingSource>)source NS_SWIFT_NAME(beginDraggingSession(items:event:source:)) API_AVAILABLE(macos(15.0));
+
+- (void)dragImage:(NSImage *)image at:(NSPoint)baseLocation offset:(NSSize)initialOffset event:(NSEvent *)event pasteboard:(NSPasteboard *)pboard source:(id)sourceObj slideBack:(BOOL)slideFlag API_DEPRECATED("Use -[NSWindow beginDraggingSessionWithItems:event:source:] instead.", macos(10.0, API_TO_BE_DEPRECATED));
+
 - (void)registerForDraggedTypes:(NSArray<NSPasteboardType> *)newTypes;
 - (void)unregisterDraggedTypes;
 @end
 
-@interface NSWindow(NSCarbonExtensions)
-
-/*! Create an \c NSWindow for a Carbon window - \c windowRef must be a Carbon \c WindowRef - see `MacWindows.h`. This method can only be called on \c NSWindow, and not subclasses of \c NSWindow. On 10.11, it will throw an exception if this is done.
- */
-- (nullable NSWindow *)initWithWindowRef:(void * /* WindowRef */)windowRef;
-
-/*! Return the Carbon \c WindowRef for this window, creating if necessary: - see `MacWindows.h`.
- */
-@property (readonly) void * /* WindowRef */windowRef NS_RETURNS_INNER_POINTER;
-@end
-
 API_AVAILABLE(macos(14.0))
 @interface NSWindow (NSDisplayLink)
 /*
@@ -879,6 +888,10 @@
 */
 - (NSArray<id<NSPreviewRepresentableActivityItem>> *_Nullable)previewRepresentableActivityItemsForWindow:(NSWindow *)window NS_SWIFT_UI_ACTOR API_AVAILABLE(macos(13.2)) API_UNAVAILABLE(ios);
 
+/*! Method called to get the window to share once sharing is confirmed, after a request is initiated by requestSharingOfWindowUsingPreview:title:completionHandler:. Implement this on the delegate of the requesting window
+ */
+- (nullable NSWindow *)windowForSharingRequestFromWindow:(NSWindow *)window NS_SWIFT_UI_ACTOR API_AVAILABLE(macos(15.0));
+
 /* Notifications
 */
 - (void)windowDidResize:(NSNotification *)notification NS_SWIFT_UI_ACTOR;
@@ -1009,9 +1022,13 @@
 @property NSWindowBackingLocation preferredBackingLocation API_DEPRECATED("This property does not do anything and should not be used", macos(10.5,10.14));
 @property (readonly) NSWindowBackingLocation backingLocation API_DEPRECATED("This property does not do anything and should not be used", macos(10.5,10.14));
 
-// showsResizeIndicator is soft-deprecated in 10.14. It is ignored on 10.7 and newer, and should not be used.
-@property BOOL showsResizeIndicator;
+@property BOOL showsResizeIndicator API_DEPRECATED("This property does not do anything and should not be used.", macos(10.0,15.0));
 
+- (nullable NSWindow *)initWithWindowRef:(void * /* WindowRef */)windowRef API_DEPRECATED("This method should not be used.", macos(10.0,15.0));
+@property (readonly) void * /* WindowRef */windowRef NS_RETURNS_INNER_POINTER API_DEPRECATED("This method should not be used.", macos(10.0,15.0));
+
+- (void)disableScreenUpdatesUntilFlush API_DEPRECATED("This method does not do anything and should not be called.", macos(10.0,15.0));
+
 @end
 
 /* Deprecated legacy style mask constants. Prefer to use NSWindowStyleMask values instead.
@@ -1038,6 +1055,8 @@
 /* Deprecated window levels
  */
 static const NSWindowLevel NSDockWindowLevel API_DEPRECATED("", macos(10.0,10.13)) = kCGDockWindowLevel;
+
+static const NSWindowSharingType NSWindowSharingReadWrite NS_SWIFT_NAME(NSWindowSharingType.readWrite) API_DEPRECATED("Use NSWindowSharingReadOnly instead", macos(10.5, 15.0)) = (NSWindowSharingType)2;
 
 
 
Clone this wiki locally