Files
ghostgram/submodules/TelegramUI/Components/RichTextEditor/Sources/RichTextEditorUIKit/RichTextLayoutSurface.swift
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

21 lines
971 B
Swift

#if canImport(UIKit)
import UIKit
/// The per-paragraph layout seam, republished for `RichTextEngineEditor`.
///
/// `BlockLayoutEngine` and `makeBlockLayout` live under `Layout/`. This file republishes them rather
/// than copying anything, which is `RichTextButtonSurface.swift`'s arrangement and for the same
/// reason: another module needs the seam, and a second copy of text layout is the one thing that
/// must not exist.
@available(iOS 13.0, *)
public typealias RichTextBlockLayout = BlockLayoutEngine
/// Builds the layout the current build selects — TextKit 2 where available, the TextKit 1 back-port
/// otherwise. The choice stays `makeBlockLayout`'s, so a caller outside this module cannot pin one.
@available(iOS 13.0, *)
public func richTextMakeBlockLayout(attributedString: NSAttributedString,
width: CGFloat) -> RichTextBlockLayout {
makeBlockLayout(attributedString: attributedString, width: width)
}
#endif