diff --git a/Sources/CodeEditSymbols/CodeEditSymbols.swift b/Sources/CodeEditSymbols/CodeEditSymbols.swift index 3870d5f..3517a73 100644 --- a/Sources/CodeEditSymbols/CodeEditSymbols.swift +++ b/Sources/CodeEditSymbols/CodeEditSymbols.swift @@ -20,6 +20,7 @@ public extension Image { static let vault_fill: Image = .init(symbol: "vault.fill") static let commit: Image = .init(symbol: "commit") static let checkout: Image = .init(symbol: "checkout") + static let branch: Image = .init(symbol: "branch") static let breakpoint: Image = .init(symbol: "breakpoint") static let breakpoint_fill: Image = .init(symbol: "breakpoint.fill") static let customChevronUpChevronDown: Image = .init(symbol: "custom.chevron.up.chevron.down") @@ -45,6 +46,7 @@ public extension NSImage { static let vault_fill: NSImage = .symbol(named: "vault.fill") static let commit: NSImage = .symbol(named: "commit") static let checkout: NSImage = .symbol(named: "checkout") + static let branch: NSImage = .symbol(named: "branch") static let breakpoint: NSImage = .symbol(named: "breakpoint") static let breakpoint_fill: NSImage = .symbol(named: "breakpoint.fill") static let customChevronUpChevronDown: NSImage = .symbol(named: "custom.chevron.up.chevron.down") diff --git a/Sources/CodeEditSymbols/Symbols.xcassets/branch.symbolset/Contents.json b/Sources/CodeEditSymbols/Symbols.xcassets/branch.symbolset/Contents.json new file mode 100644 index 0000000..bd453ac --- /dev/null +++ b/Sources/CodeEditSymbols/Symbols.xcassets/branch.symbolset/Contents.json @@ -0,0 +1,12 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "symbols" : [ + { + "filename" : "branch.svg", + "idiom" : "universal" + } + ] +} diff --git a/Sources/CodeEditSymbols/Symbols.xcassets/branch.symbolset/branch.svg b/Sources/CodeEditSymbols/Symbols.xcassets/branch.symbolset/branch.svg new file mode 100644 index 0000000..c6ded42 --- /dev/null +++ b/Sources/CodeEditSymbols/Symbols.xcassets/branch.symbolset/branch.svg @@ -0,0 +1,101 @@ + + + + + + + + + + Weight/Scale Variations + Ultralight + Thin + Light + Regular + Medium + Semibold + Bold + Heavy + Black + + + + + + + + + + + Design Variations + Symbols are supported in up to nine weights and three scales. + For optimal layout with text and other symbols, vertically align + symbols with the adjacent text. + + + + + + Margins + Leading and trailing margins on the left and right side of each symbol + can be adjusted by modifying the x-location of the margin guidelines. + Modifications are automatically applied proportionally to all + scales and weights. + + + + Exporting + Symbols should be outlined when exporting to ensure the + design is preserved when submitting to Xcode. + Template v.5.0 + Requires Xcode 15 or greater + Generated from branch + Typeset at 100.0 points + Small + Medium + Large + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/CodeEditSymbolsTests/CodeEditSymbolsTests.swift b/Tests/CodeEditSymbolsTests/CodeEditSymbolsTests.swift index ed5a8b3..f2de6ac 100644 --- a/Tests/CodeEditSymbolsTests/CodeEditSymbolsTests.swift +++ b/Tests/CodeEditSymbolsTests/CodeEditSymbolsTests.swift @@ -43,6 +43,15 @@ final class CodeEditSymbolsTests: XCTestCase { assertSnapshot(matching: view, as: .image, record: record) } + // MARK: BRANCH + + func testCreateNSImageBranch() { + let image = NSImage.branch + let view = NSImageView(image: image) + view.appearance = .init(named: .aqua) + assertSnapshot(matching: view, as: .image, record: record) + } + // MARK: BREAKPOINT func testCreateNSImageBreakpoint() { @@ -102,6 +111,15 @@ final class CodeEditSymbolsTests: XCTestCase { assertSnapshot(matching: view, as: .image(size: view.intrinsicContentSize), record: record) } + // MARK: BRANCH + + func testCreateImageBranch() { + let image = Image.branch + let view: NSView = NSHostingController(rootView: image).view + view.appearance = .init(named: .aqua) + assertSnapshot(matching: view, as: .image(size: view.intrinsicContentSize), record: record) + } + // MARK: BREAKPOINT func testCreateImageBreakpoint() {