Files
ghostgram/submodules/TelegramUI/Components/RichTextEditor/Sources/RichTextInputDecUpstream/include/IDCanonicalTextProjection.h
T
ichmagmaus111andClaude Opus 5.5 534cabe35b bug fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 16:55:08 +01:00

36 lines
1.1 KiB
Objective-C

#import <TargetConditionals.h>
#if TARGET_OS_IOS
#import <Foundation/Foundation.h>
#import "IDBlockDocument.h"
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, IDCanonicalBoundarySide) {
IDCanonicalBoundarySideText,
IDCanonicalBoundarySideBeforeSeparator,
IDCanonicalBoundarySideAfterSeparator,
};
@interface IDCanonicalLocation : NSObject
@property(nonatomic, copy, readonly) NSUUID *blockIdentifier;
@property(nonatomic, readonly) NSUInteger localOffset;
@property(nonatomic, readonly) IDCanonicalBoundarySide boundarySide;
@end
@interface IDCanonicalTextProjection : NSObject
@property(nonatomic, weak, readonly) IDBlockDocument *document;
@property(nonatomic, copy, readonly) NSString *string;
@property(nonatomic, copy, readonly) NSAttributedString *attributedString;
- (instancetype)initWithDocument:(IDBlockDocument *)document;
- (nullable IDCanonicalLocation *)locationForCanonicalOffset:(NSUInteger)offset;
- (NSUInteger)canonicalOffsetForBlockIdentifier:(NSUUID *)identifier
localOffset:(NSUInteger)localOffset;
@end
NS_ASSUME_NONNULL_END
#endif