diff --git a/DemoApp/EditorViewController.swift b/DemoApp/EditorViewController.swift index d55fe55..06d68d0 100644 --- a/DemoApp/EditorViewController.swift +++ b/DemoApp/EditorViewController.swift @@ -22,7 +22,6 @@ class EditorViewController: NSViewController { NeonPlugin(theme: .default, language: .swift) ) - textView.backgroundColor = .controlBackgroundColor textView.font = .monospacedSystemFont(ofSize: 0, weight: .regular) textView.string = """ diff --git a/Package.swift b/Package.swift index 01f22e8..adf53b8 100644 --- a/Package.swift +++ b/Package.swift @@ -23,7 +23,9 @@ let package = Package( .product(name: "STTextView", package: "STTextView"), "Neon", .product(name: "TreeSitter", package: "tree-sitter-xcframework") - ] + ], + path: "Sources/NeonPlugin", + resources: [.process("Themes.xcassets")] ) ] ) diff --git a/Sources/NeonPlugin/Coordinator.swift b/Sources/NeonPlugin/Coordinator.swift index 3e4f597..23111f4 100644 --- a/Sources/NeonPlugin/Coordinator.swift +++ b/Sources/NeonPlugin/Coordinator.swift @@ -37,7 +37,7 @@ public class Coordinator { } // set textview default font to theme default font - textView.font = theme.tokens[.default]?.font?.value ?? textView.font + textView.font = theme.defaultFont ?? textView.font highlighter = Neon.Highlighter(textInterface: STTextViewSystemInterface(textView: textView) { neonToken in var attributes: [NSAttributedString.Key: Any] = [:] @@ -45,17 +45,17 @@ public class Coordinator { attributes[.font] = tvFont } - if let themeValue = theme.tokens[TokenName(neonToken.name)] { - attributes[.foregroundColor] = themeValue.color.value + if let themeColor = theme.color(forToken: TokenName(neonToken.name)) { + attributes[.foregroundColor] = themeColor - if let font = themeValue.font?.value { - attributes[.font] = font + if let themeFont = theme.font(forToken: TokenName(neonToken.name)) { + attributes[.font] = themeFont } - } else if let themeValue = theme.tokens[.default]{ - attributes[.foregroundColor] = themeValue.color.value + } else if let themeDefaultColor = theme.defaultColor { + attributes[.foregroundColor] = themeDefaultColor - if let font = themeValue.font?.value { - attributes[.font] = font + if let themeFont = theme.font(forToken: TokenName(neonToken.name)) { + attributes[.font] = themeFont } } diff --git a/Sources/NeonPlugin/Theme/NSColor+hex.swift b/Sources/NeonPlugin/NSColor+hex.swift similarity index 100% rename from Sources/NeonPlugin/Theme/NSColor+hex.swift rename to Sources/NeonPlugin/NSColor+hex.swift diff --git a/Sources/NeonPlugin/Theme+Default.swift b/Sources/NeonPlugin/Theme+Default.swift new file mode 100644 index 0000000..43af1e6 --- /dev/null +++ b/Sources/NeonPlugin/Theme+Default.swift @@ -0,0 +1,15 @@ +import Foundation +import AppKit + +extension Theme { + + public static let `default` = Theme( + colors: Colors(bundle: Bundle.module, name: "neon.plugin.default"), + tokensCustomFontDict: [ + "default": NSFont.monospacedSystemFont(ofSize: 0, weight: .regular), + "keyword": NSFont.monospacedSystemFont(ofSize: 0, weight: .bold), + "constructor": NSFont.monospacedSystemFont(ofSize: 0, weight: .bold) + + ] + ) +} diff --git a/Sources/NeonPlugin/Theme.swift b/Sources/NeonPlugin/Theme.swift new file mode 100644 index 0000000..74bedf4 --- /dev/null +++ b/Sources/NeonPlugin/Theme.swift @@ -0,0 +1,49 @@ +import Cocoa + +public struct Theme { + + // MARK: - Props + let colors: Colors + let tokensCustomFontDict: [TokenName: NSFont] + + // MARK: - Lifecycle + public init(colors: Colors, tokensCustomFontDict: [TokenName: NSFont] = [:]) { + self.colors = colors + self.tokensCustomFontDict = tokensCustomFontDict + } + + public var defaultFont: NSFont? { + return tokensCustomFontDict["default"] + } + + public var defaultColor: NSColor? { + return color(forToken: "default") + } + + public func color(forToken tokenName: TokenName) -> NSColor? { + return colors.color(forToken: tokenName) + } + + public func font(forToken tokenName: TokenName) -> NSFont? { + return tokensCustomFontDict[tokenName] + } +} + +extension Theme { + + public struct Colors { + + let bundle: Bundle + let name: String + + public init(bundle: Bundle, name: String) { + self.bundle = bundle + self.name = name + } + + func color(forToken tokenName: TokenName) -> NSColor? { + let colorName = "\(name)/\(tokenName)" + return NSColor(named: colorName, bundle: bundle) + } + } +} diff --git a/Sources/NeonPlugin/Theme/Theme.swift b/Sources/NeonPlugin/Theme/Theme.swift deleted file mode 100644 index 42ac807..0000000 --- a/Sources/NeonPlugin/Theme/Theme.swift +++ /dev/null @@ -1,112 +0,0 @@ -import Cocoa - -public struct Theme: Decodable { - - public struct Value: Decodable { - let color: Theme.Color - let font: Theme.Font? - - public init(color: Theme.Color, font: Theme.Font? = nil) { - self.color = color - self.font = font - } - } - - let tokens: [TokenName: Theme.Value] - - public init(_ tokens: [TokenName : Theme.Value]) { - self.tokens = tokens - } -} - -extension Theme { - - public struct Font: Decodable { - public let value: NSFont - - enum CodingKeys: CodingKey { - case fontName - case size - } - - public init(_ font: NSFont) { - self.value = font - } - - public func bold() -> Self { - Theme.Font(NSFont(descriptor: value.fontDescriptor.withSymbolicTraits(.bold), size: value.pointSize)!) - } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - let fontName = try container.decode(String.self, forKey: .fontName) - let size = try container.decode(CGFloat.self, forKey: .size) - value = NSFont(name: fontName, size: size)! - } - } - - public struct Color: Decodable { - public let value: NSColor - - public init(_ color: NSColor) { - value = color - } - - public init(_ color: CGColor) { - value = NSColor(cgColor: color)! - } - - enum CodingKeys: CodingKey { - case light - case dark - } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - - let lightColor = try NSColor(hexString: container.decode(String.self, forKey: .light))! - let darkColor = try NSColor(hexString: container.decode(String.self, forKey: .dark))! - - self.value = NSColor(name: nil) { appearance in - switch appearance.name { - case .aqua, .vibrantLight, .accessibilityHighContrastAqua, .accessibilityHighContrastVibrantLight: - return lightColor - case .darkAqua, .vibrantDark, .accessibilityHighContrastDarkAqua, .accessibilityHighContrastVibrantDark: - return darkColor - default: - return lightColor - } - } - } - } -} - -extension Theme { - public static let `default` = Theme( - [ - "string": Theme.Value(color: Color(NSColor(red: 153 / 255, green: 0, blue: 0, alpha: 1)), font: nil), - "number": Theme.Value(color: Color(NSColor(red: 28 / 255, green: 0 / 255, blue: 207 / 255, alpha: 1)), font: nil), - - "keyword": Theme.Value(color: Color(NSColor(red: 155 / 255, green: 35 / 255, blue: 147 / 255, alpha: 1)), font: Font(NSFont.monospacedSystemFont(ofSize: 0, weight: .bold))), - "include": Theme.Value(color: Color(NSColor(red: 155 / 255, green: 35 / 255, blue: 147 / 255, alpha: 1)), font: nil), - "constructor": Theme.Value(color: Color(NSColor(red: 155 / 255, green: 35 / 255, blue: 147 / 255, alpha: 1)), font: Font(NSFont.monospacedSystemFont(ofSize: 0, weight: .bold))), - "keyword.function": Theme.Value(color: Color(NSColor(red: 50 / 255, green: 109 / 255, blue: 116 / 255, alpha: 1)), font: nil), - "keyword.return": Theme.Value(color: Color(NSColor(red: 155 / 255, green: 35 / 255, blue: 147 / 255, alpha: 1)), font: nil), - "variable.builtin": Theme.Value(color: Color(NSColor(red: 50 / 255, green: 109 / 255, blue: 116 / 255, alpha: 1)), font: nil), - "boolean": Theme.Value(color: Color(NSColor(red: 155 / 255, green: 35 / 255, blue: 147 / 255, alpha: 1)), font: nil), - - "type": Theme.Value(color: Color(NSColor(red: 11 / 255, green: 79 / 255, blue: 121 / 255, alpha: 1)), font: nil), - - "function.call": Theme.Value(color: Color(NSColor(red: 11 / 255, green: 79 / 255, blue: 121 / 255, alpha: 1)), font: nil), - - "variable": Theme.Value(color: Color(NSColor.textColor), font: nil), - "property": Theme.Value(color: Color(NSColor(red: 50 / 255, green: 109 / 255, blue: 116 / 255, alpha: 1)), font: nil), - "method": Theme.Value(color: Color(NSColor(red: 50 / 255, green: 109 / 255, blue: 116 / 255, alpha: 1)), font: nil), - "parameter": Theme.Value(color: Color(NSColor.textColor), font: nil), - "comment": Theme.Value(color: Color(NSColor.secondaryLabelColor), font: nil), - "operator": Theme.Value(color: Color(NSColor.textColor), font: nil), - - .default: Theme.Value(color: Color(NSColor.textColor), font: Font(NSFont.monospacedSystemFont(ofSize: 0, weight: .regular))) - ] - ) -} diff --git a/Sources/NeonPlugin/Themes.xcassets/Contents.json b/Sources/NeonPlugin/Themes.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Sources/NeonPlugin/Themes.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/Contents.json b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/Contents.json new file mode 100644 index 0000000..6e96565 --- /dev/null +++ b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/Contents.json @@ -0,0 +1,9 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "provides-namespace" : true + } +} diff --git a/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/boolean.colorset/Contents.json b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/boolean.colorset/Contents.json new file mode 100644 index 0000000..293a374 --- /dev/null +++ b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/boolean.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "147", + "green" : "35", + "red" : "155" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "108", + "green" : "220", + "red" : "100" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/comment.colorset/Contents.json b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/comment.colorset/Contents.json new file mode 100644 index 0000000..a5ce515 --- /dev/null +++ b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/comment.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "0.500", + "blue" : "0x00", + "green" : "0x00", + "red" : "0x00" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "0.550", + "blue" : "255", + "green" : "255", + "red" : "255" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/constructor.colorset/Contents.json b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/constructor.colorset/Contents.json new file mode 100644 index 0000000..293a374 --- /dev/null +++ b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/constructor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "147", + "green" : "35", + "red" : "155" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "108", + "green" : "220", + "red" : "100" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/function.call.colorset/Contents.json b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/function.call.colorset/Contents.json new file mode 100644 index 0000000..28aa05a --- /dev/null +++ b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/function.call.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "121", + "green" : "79", + "red" : "11" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "134", + "green" : "176", + "red" : "244" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/include.colorset/Contents.json b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/include.colorset/Contents.json new file mode 100644 index 0000000..293a374 --- /dev/null +++ b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/include.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "147", + "green" : "35", + "red" : "155" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "108", + "green" : "220", + "red" : "100" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/keyword.colorset/Contents.json b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/keyword.colorset/Contents.json new file mode 100644 index 0000000..293a374 --- /dev/null +++ b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/keyword.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "147", + "green" : "35", + "red" : "155" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "108", + "green" : "220", + "red" : "100" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/keyword.function.colorset/Contents.json b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/keyword.function.colorset/Contents.json new file mode 100644 index 0000000..8a72699 --- /dev/null +++ b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/keyword.function.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "116", + "green" : "109", + "red" : "50" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "139", + "green" : "146", + "red" : "205" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/keyword.return.colorset/Contents.json b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/keyword.return.colorset/Contents.json new file mode 100644 index 0000000..293a374 --- /dev/null +++ b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/keyword.return.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "147", + "green" : "35", + "red" : "155" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "108", + "green" : "220", + "red" : "100" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/method.colorset/Contents.json b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/method.colorset/Contents.json new file mode 100644 index 0000000..8a72699 --- /dev/null +++ b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/method.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "116", + "green" : "109", + "red" : "50" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "139", + "green" : "146", + "red" : "205" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/number.colorset/Contents.json b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/number.colorset/Contents.json new file mode 100644 index 0000000..454370e --- /dev/null +++ b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/number.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "207", + "green" : "0", + "red" : "28" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "48", + "green" : "255", + "red" : "227" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/operator.colorset/Contents.json b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/operator.colorset/Contents.json new file mode 100644 index 0000000..0c600f9 --- /dev/null +++ b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/operator.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x00", + "green" : "0x00", + "red" : "0x00" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/parameter.colorset/Contents.json b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/parameter.colorset/Contents.json new file mode 100644 index 0000000..0c600f9 --- /dev/null +++ b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/parameter.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x00", + "green" : "0x00", + "red" : "0x00" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/property.colorset/Contents.json b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/property.colorset/Contents.json new file mode 100644 index 0000000..8a72699 --- /dev/null +++ b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/property.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "116", + "green" : "109", + "red" : "50" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "139", + "green" : "146", + "red" : "205" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/string.colorset/Contents.json b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/string.colorset/Contents.json new file mode 100644 index 0000000..64115ec --- /dev/null +++ b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/string.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0", + "green" : "0", + "red" : "153" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "255", + "green" : "255", + "red" : "102" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/type.colorset/Contents.json b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/type.colorset/Contents.json new file mode 100644 index 0000000..28aa05a --- /dev/null +++ b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/type.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "121", + "green" : "79", + "red" : "11" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "134", + "green" : "176", + "red" : "244" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/variable.builtin.colorset/Contents.json b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/variable.builtin.colorset/Contents.json new file mode 100644 index 0000000..8a72699 --- /dev/null +++ b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/variable.builtin.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "116", + "green" : "109", + "red" : "50" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "139", + "green" : "146", + "red" : "205" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/variable.colorset/Contents.json b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/variable.colorset/Contents.json new file mode 100644 index 0000000..0c600f9 --- /dev/null +++ b/Sources/NeonPlugin/Themes.xcassets/neon.plugin.default/variable.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x00", + "green" : "0x00", + "red" : "0x00" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/NeonPlugin/Theme/TokenName.swift b/Sources/NeonPlugin/TokenName.swift similarity index 100% rename from Sources/NeonPlugin/Theme/TokenName.swift rename to Sources/NeonPlugin/TokenName.swift