-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
robot-divkit
committed
Nov 28, 2022
1 parent
2d16f3f
commit 525acfa
Showing
112 changed files
with
2,541 additions
and
2,017 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright 2021 Yandex LLC. All rights reserved. | ||
|
||
import CoreGraphics | ||
import Foundation | ||
|
||
public final class BackgroundAttribute { | ||
public static let Key = NSAttributedString.Key("RangeBackground") | ||
|
||
public let color: CGColor | ||
public let range: CFRange | ||
|
||
public init( | ||
color: CGColor, | ||
range: CFRange | ||
) { | ||
self.color = color | ||
self.range = range | ||
} | ||
|
||
public func apply(to str: CFMutableAttributedString, at range: CFRange) { | ||
CFAttributedStringSetAttribute(str, range, BackgroundAttribute.Key as CFString, self) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright 2022 Yandex LLC. All rights reserved. | ||
|
||
import CoreGraphics | ||
import Foundation | ||
|
||
public final class BorderAttribute { | ||
public static let Key = NSAttributedString.Key("RangeBorder") | ||
|
||
public let color: CGColor? | ||
public let width: CGFloat? | ||
public let cornerRadius: CGFloat? | ||
public let range: CFRange | ||
|
||
public init( | ||
color: CGColor?, | ||
width: CGFloat?, | ||
cornerRadius: CGFloat?, | ||
range: CFRange | ||
) { | ||
self.color = color | ||
self.width = width | ||
self.cornerRadius = cornerRadius | ||
self.range = range | ||
} | ||
|
||
public func apply(to str: CFMutableAttributedString, at range: CFRange) { | ||
CFAttributedStringSetAttribute(str, range, BorderAttribute.Key as CFString, self) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
public enum DivKitInfo { | ||
public static let version = "16.0.0" | ||
public static let version = "17.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.