diff --git a/Demo/.figmagen.yml b/Demo/.figmagen.yml index ecf3b1c..40c3d07 100644 --- a/Demo/.figmagen.yml +++ b/Demo/.figmagen.yml @@ -66,6 +66,10 @@ tokens: destination: FigmaGenDemo/Generated/SpacingTokens.swift templateOptions: publicAccess: true + borders: + destination: FigmaGenDemo/Generated/BorderTokens.swift + templateOptions: + publicAccess: true theme: destination: FigmaGenDemo/Generated/Theme.swift templateOptions: diff --git a/Demo/FigmaGenDemo/Generated/BorderTokens.swift b/Demo/FigmaGenDemo/Generated/BorderTokens.swift new file mode 100644 index 0000000..54f1d0c --- /dev/null +++ b/Demo/FigmaGenDemo/Generated/BorderTokens.swift @@ -0,0 +1,143 @@ +// swiftlint:disable all +// Generated using FigmaGen - https://github.com/hhru/FigmaGen + +#if canImport(UIKit) +import UIKit +#else +import AppKit +#endif + +public struct BorderToken: Hashable { + public let width: CGFloat + public let style: String + + public init(width: CGFloat, style: String) { + self.width = width + self.style = style + } +} + +internal struct BorderTokens { + // MARK: - Instance Properties + + /// semantic.border.applied + /// + /// Width: 2 + /// Style: solid + internal var semanticBorderApplied: BorderToken { + BorderToken( + width: 2, + style: "solid" + ) + } + + /// semantic.border.checkable + /// + /// Width: 1.5 + /// Style: solid + internal var semanticBorderCheckable: BorderToken { + BorderToken( + width: 1.5, + style: "solid" + ) + } + + /// semantic.border.dashed-default + /// + /// Width: 2 + /// Style: dashed + internal var semanticBorderDashedDefault: BorderToken { + BorderToken( + width: 2, + style: "dashed" + ) + } + + /// semantic.border.dashed-focused + /// + /// Width: 2 + /// Style: dashed + internal var semanticBorderDashedFocused: BorderToken { + BorderToken( + width: 2, + style: "dashed" + ) + } + + /// semantic.border.default + /// + /// Width: 1 + /// Style: solid + internal var semanticBorderDefault: BorderToken { + BorderToken( + width: 1, + style: "solid" + ) + } + + /// semantic.border.disabled + /// + /// Width: 1 + /// Style: solid + internal var semanticBorderDisabled: BorderToken { + BorderToken( + width: 1, + style: "solid" + ) + } + + /// semantic.border.focused + /// + /// Width: 2 + /// Style: solid + internal var semanticBorderFocused: BorderToken { + BorderToken( + width: 2, + style: "solid" + ) + } + + /// semantic.border.hovered + /// + /// Width: 1 + /// Style: solid + internal var semanticBorderHovered: BorderToken { + BorderToken( + width: 1, + style: "solid" + ) + } + + /// semantic.border.invalid + /// + /// Width: 1 + /// Style: solid + internal var semanticBorderInvalid: BorderToken { + BorderToken( + width: 1, + style: "solid" + ) + } + + /// semantic.border.selected + /// + /// Width: 2 + /// Style: solid + internal var semanticBorderSelected: BorderToken { + BorderToken( + width: 2, + style: "solid" + ) + } + + /// semantic.border.tab-focused + /// + /// Width: 4 + /// Style: solid + internal var semanticBorderTabFocused: BorderToken { + BorderToken( + width: 4, + style: "solid" + ) + } +} diff --git a/Demo/FigmaGenDemo/Resources/Colors.xcassets/Contents.json b/Demo/FigmaGenDemo/Resources/Colors.xcassets/Contents.json index 2fa43f1..a274db6 100644 --- a/Demo/FigmaGenDemo/Resources/Colors.xcassets/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Colors.xcassets/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 } } \ No newline at end of file diff --git a/Demo/FigmaGenDemo/Resources/Colors.xcassets/DaisyBush.colorset/Contents.json b/Demo/FigmaGenDemo/Resources/Colors.xcassets/DaisyBush.colorset/Contents.json index f8733e3..023f364 100644 --- a/Demo/FigmaGenDemo/Resources/Colors.xcassets/DaisyBush.colorset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Colors.xcassets/DaisyBush.colorset/Contents.json @@ -1,20 +1,20 @@ { - "info" : { - "version" : 1, - "author" : "FigmaGen" - }, "colors" : [ { "color" : { "color-space" : "srgb", "components" : { - "red" : "0.35686275362968445", "alpha" : "0.75", "blue" : "0.5882353186607361", - "green" : "0.25882354378700256" + "green" : "0.25882354378700256", + "red" : "0.35686275362968445" } }, "idiom" : "universal" } - ] + ], + "info" : { + "author" : "FigmaGen", + "version" : 1 + } } \ No newline at end of file diff --git a/Demo/FigmaGenDemo/Resources/Colors.xcassets/Eclipse.colorset/Contents.json b/Demo/FigmaGenDemo/Resources/Colors.xcassets/Eclipse.colorset/Contents.json index 99772d6..4e15a0f 100644 --- a/Demo/FigmaGenDemo/Resources/Colors.xcassets/Eclipse.colorset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Colors.xcassets/Eclipse.colorset/Contents.json @@ -1,20 +1,20 @@ { - "info" : { - "version" : 1, - "author" : "FigmaGen" - }, "colors" : [ { "color" : { "color-space" : "srgb", "components" : { - "red" : "0.2235294133424759", "alpha" : "1.0", "blue" : "0.2235294133424759", - "green" : "0.2235294133424759" + "green" : "0.2235294133424759", + "red" : "0.2235294133424759" } }, "idiom" : "universal" } - ] + ], + "info" : { + "author" : "FigmaGen", + "version" : 1 + } } \ No newline at end of file diff --git a/Demo/FigmaGenDemo/Resources/Colors.xcassets/JellyBean.colorset/Contents.json b/Demo/FigmaGenDemo/Resources/Colors.xcassets/JellyBean.colorset/Contents.json index e9f6133..ede2d36 100644 --- a/Demo/FigmaGenDemo/Resources/Colors.xcassets/JellyBean.colorset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Colors.xcassets/JellyBean.colorset/Contents.json @@ -1,20 +1,20 @@ { - "info" : { - "version" : 1, - "author" : "FigmaGen" - }, "colors" : [ { "color" : { "color-space" : "srgb", "components" : { - "red" : "0.25882354378700256", "alpha" : "1.0", "blue" : "0.5882353186607361", - "green" : "0.4901960790157318" + "green" : "0.4901960790157318", + "red" : "0.25882354378700256" } }, "idiom" : "universal" } - ] + ], + "info" : { + "author" : "FigmaGen", + "version" : 1 + } } \ No newline at end of file diff --git a/Demo/FigmaGenDemo/Resources/Colors.xcassets/Lochinvar.colorset/Contents.json b/Demo/FigmaGenDemo/Resources/Colors.xcassets/Lochinvar.colorset/Contents.json index a245923..ed5f229 100644 --- a/Demo/FigmaGenDemo/Resources/Colors.xcassets/Lochinvar.colorset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Colors.xcassets/Lochinvar.colorset/Contents.json @@ -1,20 +1,20 @@ { - "info" : { - "version" : 1, - "author" : "FigmaGen" - }, "colors" : [ { "color" : { "color-space" : "srgb", "components" : { - "red" : "0.25882354378700256", "alpha" : "1.0", "blue" : "0.4901960790157318", - "green" : "0.5882353186607361" + "green" : "0.5882353186607361", + "red" : "0.25882354378700256" } }, "idiom" : "universal" } - ] + ], + "info" : { + "author" : "FigmaGen", + "version" : 1 + } } \ No newline at end of file diff --git a/Demo/FigmaGenDemo/Resources/Colors.xcassets/Razzmatazz.colorset/Contents.json b/Demo/FigmaGenDemo/Resources/Colors.xcassets/Razzmatazz.colorset/Contents.json index 105793d..89cf210 100644 --- a/Demo/FigmaGenDemo/Resources/Colors.xcassets/Razzmatazz.colorset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Colors.xcassets/Razzmatazz.colorset/Contents.json @@ -1,20 +1,20 @@ { - "info" : { - "version" : 1, - "author" : "FigmaGen" - }, "colors" : [ { "color" : { "color-space" : "srgb", "components" : { - "red" : "0.8901960849761963", "alpha" : "1.0", "blue" : "0.3607843220233917", - "green" : "0.04313725605607033" + "green" : "0.04313725605607033", + "red" : "0.8901960849761963" } }, "idiom" : "universal" } - ] + ], + "info" : { + "author" : "FigmaGen", + "version" : 1 + } } \ No newline at end of file diff --git a/Demo/FigmaGenDemo/Resources/Colors.xcassets/SnowDrift.colorset/Contents.json b/Demo/FigmaGenDemo/Resources/Colors.xcassets/SnowDrift.colorset/Contents.json index 996ea25..92e03d7 100644 --- a/Demo/FigmaGenDemo/Resources/Colors.xcassets/SnowDrift.colorset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Colors.xcassets/SnowDrift.colorset/Contents.json @@ -1,20 +1,20 @@ { - "info" : { - "version" : 1, - "author" : "FigmaGen" - }, "colors" : [ { "color" : { "color-space" : "srgb", "components" : { - "red" : "0.8549019694328308", "alpha" : "1.0", "blue" : "0.8509804010391235", - "green" : "0.8549019694328308" + "green" : "0.8549019694328308", + "red" : "0.8549019694328308" } }, "idiom" : "universal" } - ] + ], + "info" : { + "author" : "FigmaGen", + "version" : 1 + } } \ No newline at end of file diff --git a/Demo/FigmaGenDemo/Resources/Colors.xcassets/Submarine.colorset/Contents.json b/Demo/FigmaGenDemo/Resources/Colors.xcassets/Submarine.colorset/Contents.json index 08104a1..caa4f87 100644 --- a/Demo/FigmaGenDemo/Resources/Colors.xcassets/Submarine.colorset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Colors.xcassets/Submarine.colorset/Contents.json @@ -1,20 +1,20 @@ { - "info" : { - "version" : 1, - "author" : "FigmaGen" - }, "colors" : [ { "color" : { "color-space" : "srgb", "components" : { - "red" : "0.5803921818733215", "alpha" : "1.0", "blue" : "0.5960784554481506", - "green" : "0.5921568870544434" + "green" : "0.5921568870544434", + "red" : "0.5803921818733215" } }, "idiom" : "universal" } - ] + ], + "info" : { + "author" : "FigmaGen", + "version" : 1 + } } \ No newline at end of file diff --git a/Demo/FigmaGenDemo/Resources/Colors.xcassets/Whisper.colorset/Contents.json b/Demo/FigmaGenDemo/Resources/Colors.xcassets/Whisper.colorset/Contents.json index ebd40e9..bd3b527 100644 --- a/Demo/FigmaGenDemo/Resources/Colors.xcassets/Whisper.colorset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Colors.xcassets/Whisper.colorset/Contents.json @@ -1,20 +1,20 @@ { - "info" : { - "version" : 1, - "author" : "FigmaGen" - }, "colors" : [ { "color" : { "color-space" : "srgb", "components" : { - "red" : "0.9137254953384399", "alpha" : "1.0", "blue" : "0.9137254953384399", - "green" : "0.9137254953384399" + "green" : "0.9137254953384399", + "red" : "0.9137254953384399" } }, "idiom" : "universal" } - ] + ], + "info" : { + "author" : "FigmaGen", + "version" : 1 + } } \ No newline at end of file diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Cloud.imageset/Cloud.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Cloud.imageset/Cloud.pdf index cc48f85..407cae7 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Cloud.imageset/Cloud.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Cloud.imageset/Cloud.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Cloud.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Cloud.imageset/Contents.json index 540d7c3..30f7efc 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Cloud.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Cloud.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "Cloud.pdf" + "filename" : "Cloud.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Contents.json index 2fa43f1..a274db6 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 } } \ No newline at end of file diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Geo.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Geo.imageset/Contents.json index 870c4d1..4019aa5 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Geo.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Geo.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "Geo.pdf" + "filename" : "Geo.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Geo.imageset/Geo.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Geo.imageset/Geo.pdf index 96ec68b..74c668e 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Geo.imageset/Geo.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Geo.imageset/Geo.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Phone.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Phone.imageset/Contents.json index 75988d7..548d826 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Phone.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Phone.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "Phone.pdf" + "filename" : "Phone.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Phone.imageset/Phone.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Phone.imageset/Phone.pdf index b3450cc..315cf7b 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Phone.imageset/Phone.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Phone.imageset/Phone.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Share.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Share.imageset/Contents.json index da64a08..6104ffb 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Share.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Share.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "Share.pdf" + "filename" : "Share.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Share.imageset/Share.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Share.imageset/Share.pdf index 6c123b5..832da6c 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Share.imageset/Share.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Share.imageset/Share.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Snapchat.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Snapchat.imageset/Contents.json index 9de5ea2..b638a4d 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Snapchat.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Snapchat.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "Snapchat.pdf" + "filename" : "Snapchat.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Snapchat.imageset/Snapchat.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Snapchat.imageset/Snapchat.pdf index 68ea315..867bfbe 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Snapchat.imageset/Snapchat.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Snapchat.imageset/Snapchat.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Star.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Star.imageset/Contents.json index 55e412b..a25926c 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Star.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Star.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "Star.pdf" + "filename" : "Star.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Star.imageset/Star.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Star.imageset/Star.pdf index 19d3c56..874d71c 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Star.imageset/Star.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Star.imageset/Star.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Telegram.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Telegram.imageset/Contents.json index 601eec2..6e13865 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Telegram.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Telegram.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "Telegram.pdf" + "filename" : "Telegram.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Telegram.imageset/Telegram.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Telegram.imageset/Telegram.pdf index 6e540a4..fcd5216 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Telegram.imageset/Telegram.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Telegram.imageset/Telegram.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Viber.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Viber.imageset/Contents.json index ea5af11..797325b 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Viber.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Viber.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "Viber.pdf" + "filename" : "Viber.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Viber.imageset/Viber.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Viber.imageset/Viber.pdf index f749571..5944614 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Viber.imageset/Viber.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/Viber.imageset/Viber.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/WeChat.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/WeChat.imageset/Contents.json index 94bced4..3c32904 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/WeChat.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/WeChat.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "WeChat.pdf" + "filename" : "WeChat.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/WeChat.imageset/WeChat.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/WeChat.imageset/WeChat.pdf index bed1d06..32e406f 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/WeChat.imageset/WeChat.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/WeChat.imageset/WeChat.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/WhatsApp.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/WhatsApp.imageset/Contents.json index 6fefb11..7fc8745 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/WhatsApp.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/WhatsApp.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "WhatsApp.pdf" + "filename" : "WhatsApp.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/WhatsApp.imageset/WhatsApp.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/WhatsApp.imageset/WhatsApp.pdf index 9f5be91..726c054 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/WhatsApp.imageset/WhatsApp.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Icon/WhatsApp.imageset/WhatsApp.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/Contents.json index 2fa43f1..a274db6 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 } } \ No newline at end of file diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/InterfaceEssentialBehanceStyleFilled.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/InterfaceEssentialBehanceStyleFilled.imageset/Contents.json index 010ab1c..5346105 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/InterfaceEssentialBehanceStyleFilled.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/InterfaceEssentialBehanceStyleFilled.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "InterfaceEssentialBehanceStyleFilled.pdf" + "filename" : "InterfaceEssentialBehanceStyleFilled.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/InterfaceEssentialBehanceStyleFilled.imageset/InterfaceEssentialBehanceStyleFilled.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/InterfaceEssentialBehanceStyleFilled.imageset/InterfaceEssentialBehanceStyleFilled.pdf index 6189715..b204451 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/InterfaceEssentialBehanceStyleFilled.imageset/InterfaceEssentialBehanceStyleFilled.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/InterfaceEssentialBehanceStyleFilled.imageset/InterfaceEssentialBehanceStyleFilled.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/InterfaceEssentialBehanceStyleOutlined.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/InterfaceEssentialBehanceStyleOutlined.imageset/Contents.json index a411805..bd0f26f 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/InterfaceEssentialBehanceStyleOutlined.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/InterfaceEssentialBehanceStyleOutlined.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "InterfaceEssentialBehanceStyleOutlined.pdf" + "filename" : "InterfaceEssentialBehanceStyleOutlined.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/InterfaceEssentialBehanceStyleOutlined.imageset/InterfaceEssentialBehanceStyleOutlined.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/InterfaceEssentialBehanceStyleOutlined.imageset/InterfaceEssentialBehanceStyleOutlined.pdf index b021183..ebc0ff1 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/InterfaceEssentialBehanceStyleOutlined.imageset/InterfaceEssentialBehanceStyleOutlined.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialBehance/InterfaceEssentialBehanceStyleOutlined.imageset/InterfaceEssentialBehanceStyleOutlined.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/Contents.json index 2fa43f1..a274db6 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 } } \ No newline at end of file diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/InterfaceEssentialDribbbleStyleFilled.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/InterfaceEssentialDribbbleStyleFilled.imageset/Contents.json index f76e387..8faeda0 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/InterfaceEssentialDribbbleStyleFilled.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/InterfaceEssentialDribbbleStyleFilled.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "InterfaceEssentialDribbbleStyleFilled.pdf" + "filename" : "InterfaceEssentialDribbbleStyleFilled.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/InterfaceEssentialDribbbleStyleFilled.imageset/InterfaceEssentialDribbbleStyleFilled.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/InterfaceEssentialDribbbleStyleFilled.imageset/InterfaceEssentialDribbbleStyleFilled.pdf index d89ec07..029d1a6 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/InterfaceEssentialDribbbleStyleFilled.imageset/InterfaceEssentialDribbbleStyleFilled.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/InterfaceEssentialDribbbleStyleFilled.imageset/InterfaceEssentialDribbbleStyleFilled.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/InterfaceEssentialDribbbleStyleOutlined.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/InterfaceEssentialDribbbleStyleOutlined.imageset/Contents.json index 18ec5d9..a929d6d 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/InterfaceEssentialDribbbleStyleOutlined.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/InterfaceEssentialDribbbleStyleOutlined.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "InterfaceEssentialDribbbleStyleOutlined.pdf" + "filename" : "InterfaceEssentialDribbbleStyleOutlined.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/InterfaceEssentialDribbbleStyleOutlined.imageset/InterfaceEssentialDribbbleStyleOutlined.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/InterfaceEssentialDribbbleStyleOutlined.imageset/InterfaceEssentialDribbbleStyleOutlined.pdf index e6b7904..ead62ce 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/InterfaceEssentialDribbbleStyleOutlined.imageset/InterfaceEssentialDribbbleStyleOutlined.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialDribbble/InterfaceEssentialDribbbleStyleOutlined.imageset/InterfaceEssentialDribbbleStyleOutlined.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/Contents.json index 2fa43f1..a274db6 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 } } \ No newline at end of file diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/InterfaceEssentialFacebookOutlined.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/InterfaceEssentialFacebookOutlined.imageset/Contents.json index 64c430a..197a1ab 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/InterfaceEssentialFacebookOutlined.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/InterfaceEssentialFacebookOutlined.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "InterfaceEssentialFacebookOutlined.pdf" + "filename" : "InterfaceEssentialFacebookOutlined.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/InterfaceEssentialFacebookOutlined.imageset/InterfaceEssentialFacebookOutlined.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/InterfaceEssentialFacebookOutlined.imageset/InterfaceEssentialFacebookOutlined.pdf index 5a0ac39..7aaaf6e 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/InterfaceEssentialFacebookOutlined.imageset/InterfaceEssentialFacebookOutlined.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/InterfaceEssentialFacebookOutlined.imageset/InterfaceEssentialFacebookOutlined.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/InterfaceEssentialFacebookStyleFilled.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/InterfaceEssentialFacebookStyleFilled.imageset/Contents.json index 7f55f7a..2e78276 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/InterfaceEssentialFacebookStyleFilled.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/InterfaceEssentialFacebookStyleFilled.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "InterfaceEssentialFacebookStyleFilled.pdf" + "filename" : "InterfaceEssentialFacebookStyleFilled.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/InterfaceEssentialFacebookStyleFilled.imageset/InterfaceEssentialFacebookStyleFilled.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/InterfaceEssentialFacebookStyleFilled.imageset/InterfaceEssentialFacebookStyleFilled.pdf index ddfc61f..3515883 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/InterfaceEssentialFacebookStyleFilled.imageset/InterfaceEssentialFacebookStyleFilled.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFacebook/InterfaceEssentialFacebookStyleFilled.imageset/InterfaceEssentialFacebookStyleFilled.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/Contents.json index 2fa43f1..a274db6 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 } } \ No newline at end of file diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/InterfaceEssentialFigmaStyleFilled.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/InterfaceEssentialFigmaStyleFilled.imageset/Contents.json index a439fee..556c5dd 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/InterfaceEssentialFigmaStyleFilled.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/InterfaceEssentialFigmaStyleFilled.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "InterfaceEssentialFigmaStyleFilled.pdf" + "filename" : "InterfaceEssentialFigmaStyleFilled.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/InterfaceEssentialFigmaStyleFilled.imageset/InterfaceEssentialFigmaStyleFilled.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/InterfaceEssentialFigmaStyleFilled.imageset/InterfaceEssentialFigmaStyleFilled.pdf index 7889687..47e4236 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/InterfaceEssentialFigmaStyleFilled.imageset/InterfaceEssentialFigmaStyleFilled.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/InterfaceEssentialFigmaStyleFilled.imageset/InterfaceEssentialFigmaStyleFilled.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/InterfaceEssentialFigmaStyleOutlined.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/InterfaceEssentialFigmaStyleOutlined.imageset/Contents.json index 30947c8..c8142e0 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/InterfaceEssentialFigmaStyleOutlined.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/InterfaceEssentialFigmaStyleOutlined.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "InterfaceEssentialFigmaStyleOutlined.pdf" + "filename" : "InterfaceEssentialFigmaStyleOutlined.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/InterfaceEssentialFigmaStyleOutlined.imageset/InterfaceEssentialFigmaStyleOutlined.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/InterfaceEssentialFigmaStyleOutlined.imageset/InterfaceEssentialFigmaStyleOutlined.pdf index 83e8da7..bd46b51 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/InterfaceEssentialFigmaStyleOutlined.imageset/InterfaceEssentialFigmaStyleOutlined.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialFigma/InterfaceEssentialFigmaStyleOutlined.imageset/InterfaceEssentialFigmaStyleOutlined.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/Contents.json index 2fa43f1..a274db6 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 } } \ No newline at end of file diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/InterfaceEssentialGoogleStyleFilled.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/InterfaceEssentialGoogleStyleFilled.imageset/Contents.json index d193700..f54934c 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/InterfaceEssentialGoogleStyleFilled.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/InterfaceEssentialGoogleStyleFilled.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "InterfaceEssentialGoogleStyleFilled.pdf" + "filename" : "InterfaceEssentialGoogleStyleFilled.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/InterfaceEssentialGoogleStyleFilled.imageset/InterfaceEssentialGoogleStyleFilled.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/InterfaceEssentialGoogleStyleFilled.imageset/InterfaceEssentialGoogleStyleFilled.pdf index a61c097..65a433c 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/InterfaceEssentialGoogleStyleFilled.imageset/InterfaceEssentialGoogleStyleFilled.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/InterfaceEssentialGoogleStyleFilled.imageset/InterfaceEssentialGoogleStyleFilled.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/InterfaceEssentialGoogleStyleOutlined.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/InterfaceEssentialGoogleStyleOutlined.imageset/Contents.json index ababe39..b5a12f5 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/InterfaceEssentialGoogleStyleOutlined.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/InterfaceEssentialGoogleStyleOutlined.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "InterfaceEssentialGoogleStyleOutlined.pdf" + "filename" : "InterfaceEssentialGoogleStyleOutlined.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/InterfaceEssentialGoogleStyleOutlined.imageset/InterfaceEssentialGoogleStyleOutlined.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/InterfaceEssentialGoogleStyleOutlined.imageset/InterfaceEssentialGoogleStyleOutlined.pdf index 1305fae..fc205ce 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/InterfaceEssentialGoogleStyleOutlined.imageset/InterfaceEssentialGoogleStyleOutlined.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialGoogle/InterfaceEssentialGoogleStyleOutlined.imageset/InterfaceEssentialGoogleStyleOutlined.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/Contents.json index 2fa43f1..a274db6 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 } } \ No newline at end of file diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/InterfaceEssentialInstagramStyleFilled.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/InterfaceEssentialInstagramStyleFilled.imageset/Contents.json index 3ad0337..400c8d1 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/InterfaceEssentialInstagramStyleFilled.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/InterfaceEssentialInstagramStyleFilled.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "InterfaceEssentialInstagramStyleFilled.pdf" + "filename" : "InterfaceEssentialInstagramStyleFilled.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/InterfaceEssentialInstagramStyleFilled.imageset/InterfaceEssentialInstagramStyleFilled.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/InterfaceEssentialInstagramStyleFilled.imageset/InterfaceEssentialInstagramStyleFilled.pdf index 13ef550..d2cc1c7 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/InterfaceEssentialInstagramStyleFilled.imageset/InterfaceEssentialInstagramStyleFilled.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/InterfaceEssentialInstagramStyleFilled.imageset/InterfaceEssentialInstagramStyleFilled.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/InterfaceEssentialInstagramStyleOutlined.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/InterfaceEssentialInstagramStyleOutlined.imageset/Contents.json index e9f94ae..2f671e1 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/InterfaceEssentialInstagramStyleOutlined.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/InterfaceEssentialInstagramStyleOutlined.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "InterfaceEssentialInstagramStyleOutlined.pdf" + "filename" : "InterfaceEssentialInstagramStyleOutlined.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/InterfaceEssentialInstagramStyleOutlined.imageset/InterfaceEssentialInstagramStyleOutlined.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/InterfaceEssentialInstagramStyleOutlined.imageset/InterfaceEssentialInstagramStyleOutlined.pdf index e079314..7af15fc 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/InterfaceEssentialInstagramStyleOutlined.imageset/InterfaceEssentialInstagramStyleOutlined.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialInstagram/InterfaceEssentialInstagramStyleOutlined.imageset/InterfaceEssentialInstagramStyleOutlined.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/Contents.json index 2fa43f1..a274db6 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 } } \ No newline at end of file diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/InterfaceEssentialLinkedinStyleFilled.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/InterfaceEssentialLinkedinStyleFilled.imageset/Contents.json index 600db9f..60af618 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/InterfaceEssentialLinkedinStyleFilled.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/InterfaceEssentialLinkedinStyleFilled.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "InterfaceEssentialLinkedinStyleFilled.pdf" + "filename" : "InterfaceEssentialLinkedinStyleFilled.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/InterfaceEssentialLinkedinStyleFilled.imageset/InterfaceEssentialLinkedinStyleFilled.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/InterfaceEssentialLinkedinStyleFilled.imageset/InterfaceEssentialLinkedinStyleFilled.pdf index f4905d7..b307d47 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/InterfaceEssentialLinkedinStyleFilled.imageset/InterfaceEssentialLinkedinStyleFilled.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/InterfaceEssentialLinkedinStyleFilled.imageset/InterfaceEssentialLinkedinStyleFilled.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/InterfaceEssentialLinkedinStyleOutlined.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/InterfaceEssentialLinkedinStyleOutlined.imageset/Contents.json index 77be0a9..675ae28 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/InterfaceEssentialLinkedinStyleOutlined.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/InterfaceEssentialLinkedinStyleOutlined.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "InterfaceEssentialLinkedinStyleOutlined.pdf" + "filename" : "InterfaceEssentialLinkedinStyleOutlined.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/InterfaceEssentialLinkedinStyleOutlined.imageset/InterfaceEssentialLinkedinStyleOutlined.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/InterfaceEssentialLinkedinStyleOutlined.imageset/InterfaceEssentialLinkedinStyleOutlined.pdf index efe7372..b14dddf 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/InterfaceEssentialLinkedinStyleOutlined.imageset/InterfaceEssentialLinkedinStyleOutlined.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialLinkedin/InterfaceEssentialLinkedinStyleOutlined.imageset/InterfaceEssentialLinkedinStyleOutlined.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/Contents.json index 2fa43f1..a274db6 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 } } \ No newline at end of file diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/InterfaceEssentialTwitterStyleFilled.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/InterfaceEssentialTwitterStyleFilled.imageset/Contents.json index f1b277e..977fa91 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/InterfaceEssentialTwitterStyleFilled.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/InterfaceEssentialTwitterStyleFilled.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "InterfaceEssentialTwitterStyleFilled.pdf" + "filename" : "InterfaceEssentialTwitterStyleFilled.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/InterfaceEssentialTwitterStyleFilled.imageset/InterfaceEssentialTwitterStyleFilled.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/InterfaceEssentialTwitterStyleFilled.imageset/InterfaceEssentialTwitterStyleFilled.pdf index 767bf8d..7488b13 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/InterfaceEssentialTwitterStyleFilled.imageset/InterfaceEssentialTwitterStyleFilled.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/InterfaceEssentialTwitterStyleFilled.imageset/InterfaceEssentialTwitterStyleFilled.pdf differ diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/InterfaceEssentialTwitterStyleOutlined.imageset/Contents.json b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/InterfaceEssentialTwitterStyleOutlined.imageset/Contents.json index b852483..5e6f3ec 100644 --- a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/InterfaceEssentialTwitterStyleOutlined.imageset/Contents.json +++ b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/InterfaceEssentialTwitterStyleOutlined.imageset/Contents.json @@ -1,13 +1,13 @@ { "images" : [ { - "idiom" : "universal", - "filename" : "InterfaceEssentialTwitterStyleOutlined.pdf" + "filename" : "InterfaceEssentialTwitterStyleOutlined.pdf", + "idiom" : "universal" } ], "info" : { - "version" : 1, - "author" : "FigmaGen" + "author" : "FigmaGen", + "version" : 1 }, "properties" : { "preserves-vector-representation" : false diff --git a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/InterfaceEssentialTwitterStyleOutlined.imageset/InterfaceEssentialTwitterStyleOutlined.pdf b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/InterfaceEssentialTwitterStyleOutlined.imageset/InterfaceEssentialTwitterStyleOutlined.pdf index a6a977b..a73f317 100644 Binary files a/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/InterfaceEssentialTwitterStyleOutlined.imageset/InterfaceEssentialTwitterStyleOutlined.pdf and b/Demo/FigmaGenDemo/Resources/Images.xcassets/Generated/Service/InterfaceEssentialTwitter/InterfaceEssentialTwitterStyleOutlined.imageset/InterfaceEssentialTwitterStyleOutlined.pdf differ diff --git a/Sources/FigmaGen/Commands/TokensCommand.swift b/Sources/FigmaGen/Commands/TokensCommand.swift index d2ba276..28ad27c 100644 --- a/Sources/FigmaGen/Commands/TokensCommand.swift +++ b/Sources/FigmaGen/Commands/TokensCommand.swift @@ -236,6 +236,30 @@ final class TokensCommand: AsyncExecutableCommand { """ ) + let bordersTemplate = Key( + "--borders-template", + description: """ + Path to the template file. + If no template is passed a default template will be used. + """ + ) + + let bordersTemplateOptions = VariadicKey( + "--borders-options", + description: """ + An option that will be merged with template context, and overwrite any values of the same name. + Can be repeated multiple times and must be in the format: -o "name:value". + """ + ) + + let bordersDestination = Key( + "--borders-destination", + description: """ + The path to the file to generate. + By default, generated code will be printed on stdout. + """ + ) + // MARK: - Initializers init(generator: TokensGenerator) { @@ -314,6 +338,13 @@ extension TokensCommand { templateOptions: resolveTemplateOptions(spacingTemplateOptions.value), destination: spacingDestination.value ) + ], + borders: [ + TemplateConfiguration( + template: bordersTemplate.value, + templateOptions: resolveTemplateOptions(bordersTemplateOptions.value), + destination: bordersDestination.value + ) ] ) ) diff --git a/Sources/FigmaGen/Dependencies.swift b/Sources/FigmaGen/Dependencies.swift index 502aea2..25658fc 100644 --- a/Sources/FigmaGen/Dependencies.swift +++ b/Sources/FigmaGen/Dependencies.swift @@ -179,6 +179,11 @@ enum Dependencies { templateRenderer: templateRenderer ) + static let borderTokensGenerator: BorderTokensGenerator = DefaultBorderTokensGenerator( + tokensResolver: tokensResolver, + templateRenderer: templateRenderer + ) + static let tokensGenerator: TokensGenerator = DefaultTokensGenerator( tokensProvider: tokensProvider, tokensGenerationParametersResolver: tokensGenerationParametersResolver, @@ -188,7 +193,8 @@ enum Dependencies { typographyTokensGenerator: typographyTokensGenerator, boxShadowTokensGenerator: boxShadowTokensGenerator, themeTokensGenerator: themeTokensGenerator, - spacingTokensGenerator: spacingTokensGenerator + spacingTokensGenerator: spacingTokensGenerator, + bordersTokensGenerator: borderTokensGenerator ) static let libraryGenerator: LibraryGenerator = DefaultLibraryGenerator( diff --git a/Sources/FigmaGen/Generators/Tokens/Contexts/BorderToken.swift b/Sources/FigmaGen/Generators/Tokens/Contexts/BorderToken.swift new file mode 100644 index 0000000..bf16663 --- /dev/null +++ b/Sources/FigmaGen/Generators/Tokens/Contexts/BorderToken.swift @@ -0,0 +1,8 @@ +import Foundation + +struct BorderToken { + + let path: [String] + let width: String + let style: String +} diff --git a/Sources/FigmaGen/Generators/Tokens/Contexts/BorderWidthToken.swift b/Sources/FigmaGen/Generators/Tokens/Contexts/BorderWidthToken.swift new file mode 100644 index 0000000..a0df264 --- /dev/null +++ b/Sources/FigmaGen/Generators/Tokens/Contexts/BorderWidthToken.swift @@ -0,0 +1,3 @@ +import Foundation + +typealias BorderWidthToken = ContextToken diff --git a/Sources/FigmaGen/Generators/Tokens/DefaultTokensGenerator.swift b/Sources/FigmaGen/Generators/Tokens/DefaultTokensGenerator.swift index 6f6f45c..5cce8aa 100644 --- a/Sources/FigmaGen/Generators/Tokens/DefaultTokensGenerator.swift +++ b/Sources/FigmaGen/Generators/Tokens/DefaultTokensGenerator.swift @@ -15,6 +15,8 @@ final class DefaultTokensGenerator: TokensGenerator { let boxShadowTokensGenerator: BoxShadowTokensGenerator let themeTokensGenerator: ThemeTokensGenerator let spacingTokensGenerator: SpacingTokensGenerator + let bordersTokensGenerator: BorderTokensGenerator + // MARK: - Initializers @@ -27,7 +29,8 @@ final class DefaultTokensGenerator: TokensGenerator { typographyTokensGenerator: TypographyTokensGenerator, boxShadowTokensGenerator: BoxShadowTokensGenerator, themeTokensGenerator: ThemeTokensGenerator, - spacingTokensGenerator: SpacingTokensGenerator + spacingTokensGenerator: SpacingTokensGenerator, + bordersTokensGenerator: BorderTokensGenerator ) { self.tokensProvider = tokensProvider self.tokensGenerationParametersResolver = tokensGenerationParametersResolver @@ -38,6 +41,7 @@ final class DefaultTokensGenerator: TokensGenerator { self.boxShadowTokensGenerator = boxShadowTokensGenerator self.themeTokensGenerator = themeTokensGenerator self.spacingTokensGenerator = spacingTokensGenerator + self.bordersTokensGenerator = bordersTokensGenerator } // MARK: - Instance Methods @@ -52,6 +56,7 @@ final class DefaultTokensGenerator: TokensGenerator { try generateBoxShadowTokens(parameters: parameters, tokenValues: tokenValues) try generateThemeTokens(parameters: parameters, tokenValues: tokenValues) try generateSpacingTokens(parameters: parameters, tokenValues: tokenValues) + try generateBorderTokens(parameters: parameters, tokenValues: tokenValues) } private func fetchTokens(from parameters: TokensGenerationParameters) async throws -> TokenValues { @@ -120,6 +125,14 @@ final class DefaultTokensGenerator: TokensGenerator { ) } + private func generateBorderTokens(parameters: TokensGenerationParameters, tokenValues: TokenValues) throws { + try generateTokens( + bordersTokensGenerator, + renderParameters: parameters.tokens.bordersRenderParameters, + tokenValues: tokenValues + ) + } + private func generateTokens( _ generator: BaseTokenGenerator, renderParameters: [RenderParameters]?, diff --git a/Sources/FigmaGen/Generators/Tokens/GenerationParametersResolver/DefaultTokensGenerationParametersResolver.swift b/Sources/FigmaGen/Generators/Tokens/GenerationParametersResolver/DefaultTokensGenerationParametersResolver.swift index 5f4c646..8add0c3 100644 --- a/Sources/FigmaGen/Generators/Tokens/GenerationParametersResolver/DefaultTokensGenerationParametersResolver.swift +++ b/Sources/FigmaGen/Generators/Tokens/GenerationParametersResolver/DefaultTokensGenerationParametersResolver.swift @@ -89,6 +89,11 @@ final class DefaultTokensGenerationParametersResolver: TokensGenerationParameter defaultTemplateType: .native(name: "SpacingTokens") ) + let borderRenderParameters = renderParametersResolver.resolveRenderParameters( + templates: configuration.templates?.borders, + defaultTemplateType: .native(name: "BorderTokens") + ) + return TokensGenerationParameters( file: file, remoteFile: remoteFile, @@ -99,7 +104,8 @@ final class DefaultTokensGenerationParametersResolver: TokensGenerationParameter typographyRenderParameters: typographyRenderParameters, boxShadowRenderParameters: boxShadowRenderParameters, themeRenderParameters: themeRenderParameters, - spacingRenderParameters: spacingRenderParameters + spacingRenderParameters: spacingRenderParameters, + bordersRenderParameters: borderRenderParameters ) ) } diff --git a/Sources/FigmaGen/Generators/Tokens/Generators/Borders/BorderTokensGenerator.swift b/Sources/FigmaGen/Generators/Tokens/Generators/Borders/BorderTokensGenerator.swift new file mode 100644 index 0000000..f142449 --- /dev/null +++ b/Sources/FigmaGen/Generators/Tokens/Generators/Borders/BorderTokensGenerator.swift @@ -0,0 +1,3 @@ +import Foundation + +protocol BorderTokensGenerator: BaseTokenGenerator { } diff --git a/Sources/FigmaGen/Generators/Tokens/Generators/Borders/DefaultBorderTokensGenerator.swift b/Sources/FigmaGen/Generators/Tokens/Generators/Borders/DefaultBorderTokensGenerator.swift new file mode 100644 index 0000000..a52e7fc --- /dev/null +++ b/Sources/FigmaGen/Generators/Tokens/Generators/Borders/DefaultBorderTokensGenerator.swift @@ -0,0 +1,92 @@ +import Foundation + +struct DefaultBorderTokensGenerator: BorderTokensGenerator { + + // MARK: - Instance properties + + private let tokensResolver: TokensResolver + private let templateRenderer: TemplateRenderer + + // MARK: - Initializers + + init(tokensResolver: TokensResolver, templateRenderer: TemplateRenderer) { + self.tokensResolver = tokensResolver + self.templateRenderer = templateRenderer + } + + // MARK: - Private instance methods + + private func getBorderToken( + from token: TokenValue, + tokens: TokenValues + ) throws -> BorderToken? { + guard case .border(let value) = token.type else { + return nil + } + + return BorderToken( + path: token.name.components(separatedBy: "."), + width: try tokensResolver.resolveValue( + value.width, + tokenValues: tokens, + theme: .undefined + ), + style: value.style + ) + } + + private func getBorderWidth( + from token: TokenValue, + tokens: TokenValues + ) throws -> BorderWidthToken? { + guard case .borderWidth(let value) = token.type else { + return nil + } + + return BorderWidthToken( + path: token.name.components(separatedBy: "."), + value: try tokensResolver.resolveValue( + value, + tokenValues: tokens, + theme: .undefined + ) + ) + } + + private func extractBorderData( + from tokens: [TokenValue], + tokenValues: TokenValues + ) throws -> (borders: [BorderToken], borderWidth: [BorderWidthToken]) { + try tokens.reduce((borders: [BorderToken](), borderWidth: [BorderWidthToken]())) { partialResult, value in + var result = partialResult + + if let borderToken = try getBorderToken(from: value, tokens: tokenValues) { + result.borders.append(borderToken) + } + + if let borderWidth = try getBorderWidth(from: value, tokens: tokenValues) { + result.borderWidth.append(borderWidth) + } + + return result + } + } + + // MARK: - BorderTokensGenerator + + func generate(renderParameters: RenderParameters, tokenValues: TokenValues) throws { + let coreBorderData = try extractBorderData(from: tokenValues.core, tokenValues: tokenValues) + let semanticBorderData = try extractBorderData(from: tokenValues.semantic, tokenValues: tokenValues) + + try templateRenderer.renderTemplate( + renderParameters.template, + to: renderParameters.destination, + context: [ + "coreBorders": coreBorderData.borders, + "semanticBorders": semanticBorderData.borders, + "coreBorderWidth": coreBorderData.borderWidth, + "semanticBorderWidth": semanticBorderData.borderWidth + ] + ) + } +} diff --git a/Sources/FigmaGen/Models/Configuration/Tokens/TokensTemplateConfiguration.swift b/Sources/FigmaGen/Models/Configuration/Tokens/TokensTemplateConfiguration.swift index a267946..bf165db 100644 --- a/Sources/FigmaGen/Models/Configuration/Tokens/TokensTemplateConfiguration.swift +++ b/Sources/FigmaGen/Models/Configuration/Tokens/TokensTemplateConfiguration.swift @@ -12,6 +12,7 @@ struct TokensTemplateConfiguration { let boxShadows: [TemplateConfiguration]? let theme: [TemplateConfiguration]? let spacing: [TemplateConfiguration]? + let borders: [TemplateConfiguration]? } // MARK: - Decodable @@ -28,6 +29,7 @@ extension TokensTemplateConfiguration: Decodable { case boxShadows case theme case spacing + case borders } // MARK: - Initializers @@ -48,5 +50,6 @@ extension TokensTemplateConfiguration: Decodable { boxShadows = try container.decodeIfPresent(TemplateConfigurationWrapper.self, forKey: .boxShadows)?.templates theme = try container.decodeIfPresent(TemplateConfigurationWrapper.self, forKey: .theme)?.templates spacing = try container.decodeIfPresent(TemplateConfigurationWrapper.self, forKey: .spacing)?.templates + borders = try? container.decodeIfPresent(TemplateConfigurationWrapper.self, forKey: .borders)?.templates } } diff --git a/Sources/FigmaGen/Models/Parameters/TokensGenerationParameters.swift b/Sources/FigmaGen/Models/Parameters/TokensGenerationParameters.swift index 224cef9..6c4a7b0 100644 --- a/Sources/FigmaGen/Models/Parameters/TokensGenerationParameters.swift +++ b/Sources/FigmaGen/Models/Parameters/TokensGenerationParameters.swift @@ -15,6 +15,7 @@ struct TokensGenerationParameters { let boxShadowRenderParameters: [RenderParameters]? let themeRenderParameters: [RenderParameters]? let spacingRenderParameters: [RenderParameters]? + let bordersRenderParameters: [RenderParameters]? } // MARK: - Instance Properties diff --git a/Templates/BorderTokens.stencil b/Templates/BorderTokens.stencil new file mode 100644 index 0000000..40c2203 --- /dev/null +++ b/Templates/BorderTokens.stencil @@ -0,0 +1,49 @@ +{% include "FileHeader.stencil" %} +{% if semanticBorders or coreBorders -%} +{% set accessModifier %}{% if options.publicAccess %}public{% else %}internal{% endif %}{% endset %} +{% set tokenTypeName %}{{ options.tokenTypeName|default:"BorderTokens" }}{% endset %} +{% macro propertyName name %}{{ name|swiftIdentifier:"pretty"|lowerFirstWord|escapeReservedKeywords }}{% endmacro %} +{% macro borderProperty border -%} + /// {{ border.path|join:"." }} + /// + /// Width: {{ border.width }} + /// Style: {{ border.style|default:"solid" }} + {{ accessModifier }} var {% call propertyName border.path|join:"_" %}: BorderToken { + BorderToken( + width: {{ border.width }}, + style: "{{ border.style|default:"solid" }}" + ) + } +{%- endmacro %} + +#if canImport(UIKit) +import UIKit +#else +import AppKit +#endif + +public struct BorderToken: Hashable { + public let width: CGFloat + public let style: String + + public init(width: CGFloat, style: String) { + self.width = width + self.style = style + } +} + +{{ accessModifier }} struct {{ tokenTypeName }} { + + // MARK: - Instance Properties + {% for border in semanticBorders %} + + {% call borderProperty border %} + {% endfor %} + {% for border in coreBorders %} + + {% call borderProperty border %} + {% endfor %} +} +{%- else -%} +// No border tokens found +{%- endif %}