diff --git a/Sources/CodeEditSymbols/CodeEditSymbols.swift b/Sources/CodeEditSymbols/CodeEditSymbols.swift index eae49de..3870d5f 100644 --- a/Sources/CodeEditSymbols/CodeEditSymbols.swift +++ b/Sources/CodeEditSymbols/CodeEditSymbols.swift @@ -23,6 +23,7 @@ public extension Image { 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") + static let github: Image = .init(symbol: "github") // add static properties for your symbols above this line @@ -47,6 +48,7 @@ public extension NSImage { 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") + static let github: NSImage = .symbol(named: "github") // add static properties for your symbols above this line diff --git a/Sources/CodeEditSymbols/Symbols.xcassets/github.symbolset/Contents.json b/Sources/CodeEditSymbols/Symbols.xcassets/github.symbolset/Contents.json new file mode 100644 index 0000000..c1e81e1 --- /dev/null +++ b/Sources/CodeEditSymbols/Symbols.xcassets/github.symbolset/Contents.json @@ -0,0 +1,12 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "symbols" : [ + { + "filename" : "github.svg", + "idiom" : "universal" + } + ] +} diff --git a/Sources/CodeEditSymbols/Symbols.xcassets/github.symbolset/github.svg b/Sources/CodeEditSymbols/Symbols.xcassets/github.symbolset/github.svg new file mode 100644 index 0000000..d4ff6b5 --- /dev/null +++ b/Sources/CodeEditSymbols/Symbols.xcassets/github.symbolset/github.svg @@ -0,0 +1,99 @@ + + + + + + + + + + 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.4.0 + Requires Xcode 14 or greater + Generated from github + Typeset at 100 points + Small + Medium + Large + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/CodeEditSymbolsTests/CodeEditSymbolsTests.swift b/Tests/CodeEditSymbolsTests/CodeEditSymbolsTests.swift index cc7c2e8..ed5a8b3 100644 --- a/Tests/CodeEditSymbolsTests/CodeEditSymbolsTests.swift +++ b/Tests/CodeEditSymbolsTests/CodeEditSymbolsTests.swift @@ -59,6 +59,13 @@ final class CodeEditSymbolsTests: XCTestCase { assertSnapshot(matching: view, as: .image, record: record) } + func testCreateNSImageGitHub() { + let image = NSImage.github + let view = NSImageView(image: image) + view.appearance = .init(named: .aqua) + assertSnapshot(matching: view, as: .image, record: record) + } + // MARK: - Image Tests // MARK: VAULT @@ -110,4 +117,11 @@ final class CodeEditSymbolsTests: XCTestCase { view.appearance = .init(named: .aqua) assertSnapshot(matching: view, as: .image(size: view.intrinsicContentSize), record: record) } + + func testCreateImageGitHub() { + let image = Image.github + let view: NSView = NSHostingController(rootView: image).view + view.appearance = .init(named: .aqua) + assertSnapshot(matching: view, as: .image(size: view.intrinsicContentSize), record: record) + } } diff --git a/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageBreakpoint.1.png b/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageBreakpoint.1.png index f8eeb2c..d9d6eb5 100644 Binary files a/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageBreakpoint.1.png and b/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageBreakpoint.1.png differ diff --git a/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageBreakpointFill.1.png b/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageBreakpointFill.1.png index bade715..e8b38d2 100644 Binary files a/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageBreakpointFill.1.png and b/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageBreakpointFill.1.png differ diff --git a/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageCheckout.1.png b/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageCheckout.1.png index 081babb..f13a618 100644 Binary files a/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageCheckout.1.png and b/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageCheckout.1.png differ diff --git a/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageCommit.1.png b/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageCommit.1.png index 8cfb867..3f26adf 100644 Binary files a/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageCommit.1.png and b/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageCommit.1.png differ diff --git a/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageGitHub.1.png b/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageGitHub.1.png new file mode 100644 index 0000000..03e3c9b Binary files /dev/null and b/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageGitHub.1.png differ diff --git a/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageVault.1.png b/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageVault.1.png index ea5a2d8..d4fc41c 100644 Binary files a/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageVault.1.png and b/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageVault.1.png differ diff --git a/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageVaultFill.1.png b/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageVaultFill.1.png index b296325..76d13e3 100644 Binary files a/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageVaultFill.1.png and b/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateImageVaultFill.1.png differ diff --git a/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateNSImageBreakpointFill.1.png b/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateNSImageBreakpointFill.1.png index 47701c8..df74a1c 100644 Binary files a/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateNSImageBreakpointFill.1.png and b/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateNSImageBreakpointFill.1.png differ diff --git a/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateNSImageGitHub.1.png b/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateNSImageGitHub.1.png new file mode 100644 index 0000000..ec49bf3 Binary files /dev/null and b/Tests/CodeEditSymbolsTests/__Snapshots__/CodeEditSymbolsTests/testCreateNSImageGitHub.1.png differ