diff --git a/SwiftLeeds.xcodeproj/project.pbxproj b/SwiftLeeds.xcodeproj/project.pbxproj index f62da03..8b2d04f 100644 --- a/SwiftLeeds.xcodeproj/project.pbxproj +++ b/SwiftLeeds.xcodeproj/project.pbxproj @@ -92,6 +92,7 @@ 7B31C8F12ED0A7BF00FEEDF7 /* Settings in Frameworks */ = {isa = PBXBuildFile; productRef = 7B31C8F02ED0A7BF00FEEDF7 /* Settings */; }; 7B31C8F32ED0AB0E00FEEDF7 /* Settings in Frameworks */ = {isa = PBXBuildFile; productRef = 7B31C8F22ED0AB0E00FEEDF7 /* Settings */; }; 7B31C8F52ED0AB1600FEEDF7 /* Settings in Frameworks */ = {isa = PBXBuildFile; productRef = 7B31C8F42ED0AB1600FEEDF7 /* Settings */; }; + 7B8C3ECF2EE4A9F70089C6CF /* SharedAssets in Frameworks */ = {isa = PBXBuildFile; productRef = 7B8C3ECE2EE4A9F70089C6CF /* SharedAssets */; }; AE1C8010289E9F3800996659 /* String.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE1C800F289E9F3800996659 /* String.swift */; }; AE1C801428A7BCD000996659 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = AE1C801328A7BCD000996659 /* Settings.bundle */; }; AE32CDF0286CCF9D00DF0AFF /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE32CDEF286CCF9D00DF0AFF /* Constants.swift */; }; @@ -307,6 +308,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 7B8C3ECF2EE4A9F70089C6CF /* SharedAssets in Frameworks */, 7B31C8E52ED08DD100FEEDF7 /* Networking in Frameworks */, 7B31C8F12ED0A7BF00FEEDF7 /* Settings in Frameworks */, 74F5EF8C2A4B4352008D9413 /* ReadabilityModifier in Frameworks */, @@ -676,6 +678,7 @@ 7B31C8E42ED08DD100FEEDF7 /* Networking */, 7B31C8EA2ED0959000FEEDF7 /* DesignKit */, 7B31C8F02ED0A7BF00FEEDF7 /* Settings */, + 7B8C3ECE2EE4A9F70089C6CF /* SharedAssets */, ); productName = SwiftLeeds; productReference = AECB295327417F9D00CDC983 /* SwiftLeeds.app */; @@ -1525,6 +1528,10 @@ isa = XCSwiftPackageProductDependency; productName = Settings; }; + 7B8C3ECE2EE4A9F70089C6CF /* SharedAssets */ = { + isa = XCSwiftPackageProductDependency; + productName = SharedAssets; + }; AE5EFD72289DC1D000464FE1 /* CachedAsyncImage */ = { isa = XCSwiftPackageProductDependency; package = AE5EFD71289DC1D000464FE1 /* XCRemoteSwiftPackageReference "swiftui-cached-async-image" */; diff --git a/SwiftLeeds.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/SwiftLeeds.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 6794260..d1a00f3 100644 --- a/SwiftLeeds.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/SwiftLeeds.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "14f2f2f8f24b8e0498b003261f3de0cbd1af8008855390449874ffab4bdbbd32", + "originHash" : "7b97790ca80d08686d9c9fcc756f857d9951541bb61167ef5df024519c64b182", "pins" : [ { "identity" : "readabilitymodifier", @@ -10,6 +10,15 @@ "version" : "1.0.0" } }, + { + "identity" : "swiftgenplugin", + "kind" : "remoteSourceControl", + "location" : "https://github.com/shadone/SwiftGenPlugin", + "state" : { + "branch" : "6.6.2+deriveddatafix", + "revision" : "9eb26960d2ebecbe74feecc695e6125eb39e797e" + } + }, { "identity" : "swiftui-cached-async-image", "kind" : "remoteSourceControl", diff --git a/SwiftLeedsPackage/Package.resolved b/SwiftLeedsPackage/Package.resolved new file mode 100644 index 0000000..73ddc0e --- /dev/null +++ b/SwiftLeedsPackage/Package.resolved @@ -0,0 +1,15 @@ +{ + "originHash" : "e72f8f7e5964e57cc3bd7cf4731a74f3869e73bfce1ee20f37f3216c7ed82a39", + "pins" : [ + { + "identity" : "swiftgenplugin", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SwiftGen/SwiftGenPlugin", + "state" : { + "revision" : "879b85a470cacd70c19e22eb7e11a3aed66f4068", + "version" : "6.6.2" + } + } + ], + "version" : 3 +} diff --git a/SwiftLeedsPackage/Package.swift b/SwiftLeedsPackage/Package.swift index e05f43c..92a76d5 100644 --- a/SwiftLeedsPackage/Package.swift +++ b/SwiftLeedsPackage/Package.swift @@ -32,6 +32,15 @@ let package = Package( "Settings", ] ), + .library( + name: "SharedAssets", + targets: [ + "SharedAssets", + ] + ) + ], + dependencies: [ + .package(url: "https://github.com/shadone/SwiftGenPlugin", branch: "6.6.2+deriveddatafix"), ], targets: [ .target( @@ -51,7 +60,13 @@ let package = Package( ), .target( name: "ColorTheme" - ) + ), + .target( + name: "SharedAssets", + plugins: [ + .plugin(name: "SwiftGenPlugin", package: "SwiftGenPlugin"), + ] + ), ], // Set to v5 to avoid strict concurrency checking in pre swift 6 code swiftLanguageModes: [ diff --git a/SwiftLeedsPackage/Sources/SharedAssets/RequiredSwiftFileForSPM.swift b/SwiftLeedsPackage/Sources/SharedAssets/RequiredSwiftFileForSPM.swift new file mode 100644 index 0000000..1573ea1 --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/RequiredSwiftFileForSPM.swift @@ -0,0 +1,17 @@ +// File needed to avoid Swift Package compilation error + +import SwiftUI + +struct Test: View { + var body: some View { + ZStack { + Color.accent + Image.appIconPreview2024 + } + .edgesIgnoringSafeArea(.vertical) + } +} + +#Preview { + Test() +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/Accent.colorset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/Accent.colorset/Contents.json new file mode 100644 index 0000000..622f9df --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/Accent.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x30", + "green" : "0x3B", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/Background.colorset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/Background.colorset/Contents.json new file mode 100644 index 0000000..ffe396e --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/Background.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xED", + "green" : "0xED", + "red" : "0xED" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x1E", + "green" : "0x1D", + "red" : "0x1C" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/CellBackground.colorset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/CellBackground.colorset/Contents.json new file mode 100644 index 0000000..0a5f36b --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/CellBackground.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x3A", + "green" : "0x3A", + "red" : "0x3A" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/CellBorder.colorset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/CellBorder.colorset/Contents.json new file mode 100644 index 0000000..2172cd9 --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/CellBorder.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xD4", + "green" : "0xD4", + "red" : "0xD4" + } + }, + "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/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/CellForeground.colorset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/CellForeground.colorset/Contents.json new file mode 100644 index 0000000..8fe3a46 --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/CellForeground.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x4A", + "green" : "0x4A", + "red" : "0x4A" + } + }, + "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/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/Gradients/BuyTicketGradientEnd.colorset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/Gradients/BuyTicketGradientEnd.colorset/Contents.json new file mode 100644 index 0000000..3f5936a --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/Gradients/BuyTicketGradientEnd.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x9A", + "green" : "0x9A", + "red" : "0x9A" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x7F", + "green" : "0x7F", + "red" : "0x7F" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/Gradients/BuyTicketGradientStart.colorset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/Gradients/BuyTicketGradientStart.colorset/Contents.json new file mode 100644 index 0000000..ab99192 --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/Gradients/BuyTicketGradientStart.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x5E", + "green" : "0x5E", + "red" : "0x5E" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x5E", + "green" : "0x5E", + "red" : "0x5E" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/Gradients/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/Gradients/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/Gradients/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/LaunchScreenBackground.colorset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/LaunchScreenBackground.colorset/Contents.json new file mode 100644 index 0000000..a189b85 --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/LaunchScreenBackground.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "1.000", + "green" : "1.000", + "red" : "1.000" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x3A", + "green" : "0x3A", + "red" : "0x3A" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/ListBackground.colorset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/ListBackground.colorset/Contents.json new file mode 100644 index 0000000..5a2c0c9 --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/ListBackground.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x1E", + "green" : "0x1D", + "red" : "0x1C" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/TabBarBackground.colorset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/TabBarBackground.colorset/Contents.json new file mode 100644 index 0000000..d3c246b --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Colors.xcassets/TabBarBackground.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF9", + "green" : "0xF9", + "red" : "0xF9" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x39", + "green" : "0x39", + "red" : "0x39" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/AppIconPreview-2024.imageset/AppIcon 1.png b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/AppIconPreview-2024.imageset/AppIcon 1.png new file mode 100644 index 0000000..55700fc Binary files /dev/null and b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/AppIconPreview-2024.imageset/AppIcon 1.png differ diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/AppIconPreview-2024.imageset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/AppIconPreview-2024.imageset/Contents.json new file mode 100644 index 0000000..345310e --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/AppIconPreview-2024.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "AppIcon 1.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/AppIconPreview-Olympics.imageset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/AppIconPreview-Olympics.imageset/Contents.json new file mode 100644 index 0000000..8c67536 --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/AppIconPreview-Olympics.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Frame 110.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/AppIconPreview-Olympics.imageset/Frame 110.png b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/AppIconPreview-Olympics.imageset/Frame 110.png new file mode 100644 index 0000000..b5646c3 Binary files /dev/null and b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/AppIconPreview-Olympics.imageset/Frame 110.png differ diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/AppIconPreview-Space.imageset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/AppIconPreview-Space.imageset/Contents.json new file mode 100644 index 0000000..c8b656c --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/AppIconPreview-Space.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "Frame 139.png", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/AppIconPreview-Space.imageset/Frame 139.png b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/AppIconPreview-Space.imageset/Frame 139.png new file mode 100644 index 0000000..c636a87 Binary files /dev/null and b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/AppIconPreview-Space.imageset/Frame 139.png differ diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/CarriageworksTheatre.imageset/CarriageworksTheatre.jpg b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/CarriageworksTheatre.imageset/CarriageworksTheatre.jpg new file mode 100644 index 0000000..3fe2e33 Binary files /dev/null and b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/CarriageworksTheatre.imageset/CarriageworksTheatre.jpg differ diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/CarriageworksTheatre.imageset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/CarriageworksTheatre.imageset/Contents.json new file mode 100644 index 0000000..14428b2 --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/CarriageworksTheatre.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "CarriageworksTheatre.jpg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/Clock.imageset/Clock.pdf b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/Clock.imageset/Clock.pdf new file mode 100644 index 0000000..50298ce Binary files /dev/null and b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/Clock.imageset/Clock.pdf differ diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/Clock.imageset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/Clock.imageset/Contents.json new file mode 100644 index 0000000..d18ee86 --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/Clock.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "Clock.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/Icon.imageset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/Icon.imageset/Contents.json new file mode 100644 index 0000000..8767c87 --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/Icon.imageset/Contents.json @@ -0,0 +1,25 @@ +{ + "images" : [ + { + "filename" : "Icon.pdf", + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "Icon-Dark.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/Icon.imageset/Icon-Dark.pdf b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/Icon.imageset/Icon-Dark.pdf new file mode 100644 index 0000000..987e390 Binary files /dev/null and b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/Icon.imageset/Icon-Dark.pdf differ diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/Icon.imageset/Icon.pdf b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/Icon.imageset/Icon.pdf new file mode 100644 index 0000000..0a9aa2c Binary files /dev/null and b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/Icon.imageset/Icon.pdf differ diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..9f6bb5a --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,56 @@ +{ + "images" : [ + { + "filename" : "LaunchScreen.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "LaunchScreen-Dark.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "LaunchScreen@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "LaunchScreen-Dark@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "LaunchScreen@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "LaunchScreen-Dark@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/LaunchScreen-Dark.png b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/LaunchScreen-Dark.png new file mode 100644 index 0000000..db41179 Binary files /dev/null and b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/LaunchScreen-Dark.png differ diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/LaunchScreen-Dark@2x.png b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/LaunchScreen-Dark@2x.png new file mode 100644 index 0000000..5ae4cd0 Binary files /dev/null and b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/LaunchScreen-Dark@2x.png differ diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/LaunchScreen-Dark@3x.png b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/LaunchScreen-Dark@3x.png new file mode 100644 index 0000000..eb72942 Binary files /dev/null and b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/LaunchScreen-Dark@3x.png differ diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/LaunchScreen.png b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/LaunchScreen.png new file mode 100644 index 0000000..537a79c Binary files /dev/null and b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/LaunchScreen.png differ diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/LaunchScreen@2x.png b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/LaunchScreen@2x.png new file mode 100644 index 0000000..03515a5 Binary files /dev/null and b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/LaunchScreen@2x.png differ diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/LaunchScreen@3x.png b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/LaunchScreen@3x.png new file mode 100644 index 0000000..13c9e03 Binary files /dev/null and b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LaunchImage.imageset/LaunchScreen@3x.png differ diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LeedsPlayhouse.imageset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LeedsPlayhouse.imageset/Contents.json new file mode 100644 index 0000000..b38ca61 --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LeedsPlayhouse.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "LeedsPlayhouse.jpeg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "original" + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LeedsPlayhouse.imageset/LeedsPlayhouse.jpeg b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LeedsPlayhouse.imageset/LeedsPlayhouse.jpeg new file mode 100644 index 0000000..3d79330 Binary files /dev/null and b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/LeedsPlayhouse.imageset/LeedsPlayhouse.jpeg differ diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/SwiftLeedsIcon.imageset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/SwiftLeedsIcon.imageset/Contents.json new file mode 100644 index 0000000..62e9408 --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/SwiftLeedsIcon.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "filename" : "SwiftLeedsIcon.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true, + "template-rendering-intent" : "original" + } +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/SwiftLeedsIcon.imageset/SwiftLeedsIcon.pdf b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/SwiftLeedsIcon.imageset/SwiftLeedsIcon.pdf new file mode 100644 index 0000000..ffd8991 Binary files /dev/null and b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/SwiftLeedsIcon.imageset/SwiftLeedsIcon.pdf differ diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/wineglass.fill.symbolset/Contents.json b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/wineglass.fill.symbolset/Contents.json new file mode 100644 index 0000000..5a196f2 --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/wineglass.fill.symbolset/Contents.json @@ -0,0 +1,12 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "symbols" : [ + { + "filename" : "wineglass.fill.svg", + "idiom" : "universal" + } + ] +} diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/wineglass.fill.symbolset/wineglass.fill.svg b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/wineglass.fill.symbolset/wineglass.fill.svg new file mode 100644 index 0000000..84c5d2f --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Resources/Images.xcassets/wineglass.fill.symbolset/wineglass.fill.svg @@ -0,0 +1,93 @@ + + + + + + + + + Weight/Scale Variations + Ultralight + Thin + Light + Regular + Medium + Semibold + Bold + Heavy + Black + + + + + + + + + + + Design Variations + Symbols are supported in up to nine weights and three scales. + For optimal layout with text and other symbols, vertically align + symbols with the adjacent text. + + + + + + Margins + Leading and trailing margins on the left and right side of each symbol + can be adjusted by modifying the x-location of the margin guidelines. + Modifications are automatically applied proportionally to all + scales and weights. + + + + Exporting + Symbols should be outlined when exporting to ensure the + design is preserved when submitting to Xcode. + Template v.3.0 + Requires Xcode 13 or greater + Generated from wineglass.fill + Typeset at 100 points + Small + Medium + Large + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SwiftLeedsPackage/Sources/SharedAssets/Templates/assets.stencil b/SwiftLeedsPackage/Sources/SharedAssets/Templates/assets.stencil new file mode 100644 index 0000000..48ce3fd --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/Templates/assets.stencil @@ -0,0 +1,238 @@ +// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen +// Template created by Yehor Myropoltsev +// See: https://gist.github.com/yegormi/1aaeb901f7a54a27d0e5016ae5103317 +// swiftlint:disable all +{% if catalogs %} +{% set resourcePrefix %}{{param.resourcePrefix|default:""}}{% endset %} +{% set accessModifier %}{% if param.publicAccess %}public{% else %}internal{% endif %}{% endset %} +{% macro casesBlock assets assetType %} + {% for asset in assets %} + {% if asset.type == assetType %} + /// The "{{ asset.name }}" asset catalog {{ assetType }} resource. + static let {{ asset.name|swiftIdentifier:"pretty"|lowerFirstWord|escapeReservedKeywords }} = {{ resourcePrefix }}{{ assetType|capitalize }}Theme(name: "{{ asset.name }}", bundle: resourceBundle) + {% elif asset.items %} + {% call casesBlock asset.items assetType %} + {% endif %} + {% endfor %} +{% endmacro %} +{% macro allValuesBlock catalogs assetType %} + {% if catalogs.count > 1 %} + {% for catalog in catalogs %} + {% if catalog.assets %} + {% call casesBlock catalog.assets assetType %} + {% endif %} + {% endfor %} + {% else %} + {% call casesBlock catalogs.first.assets assetType %} + {% endif %} +{% endmacro %} +{% macro generateAssetProperty asset assetType platform %} + /// The "{{ asset.name }}" asset catalog {{ assetType }}. + static var {{ asset.name|swiftIdentifier:"pretty"|lowerFirstWord|escapeReservedKeywords }}: {{ platform }} { + {% if platform == "Color" %} + Color(theme: .{{ asset.name|swiftIdentifier:"pretty"|lowerFirstWord|escapeReservedKeywords }}) + {% elif platform == "Image" %} + Image(theme: .{{ asset.name|swiftIdentifier:"pretty"|lowerFirstWord|escapeReservedKeywords }}) + {% elif platform == "NSColor" or platform == "UIColor" or platform == "NSImage" or platform == "UIImage" %} + #if !os(watchOS) && !targetEnvironment(macCatalyst) + {{ platform }}(theme: .{{ asset.name|swiftIdentifier:"pretty"|lowerFirstWord|escapeReservedKeywords }}) + #else + {{ platform }}() + #endif + {% else %} + fatalError("Unsupported platform: {{ platform }}") + {% endif %} + } +{% endmacro %} +{% macro processAssets assets assetType platform %} + {% for asset in assets %} + {% if asset.type == assetType %} + {% call generateAssetProperty asset assetType platform %} + {% elif asset.items %} + {% call processAssets asset.items assetType platform %} + {% endif %} + {% endfor %} +{% endmacro %} +{% macro extensionBlock catalogs assetType platform %} + {% if catalogs.count > 1 %} + {% for catalog in catalogs %} + {% if catalog.assets %} + {% call processAssets catalog.assets assetType platform %} + {% endif %} + {% endfor %} + {% else %} + {% call processAssets catalogs.first.assets assetType platform %} + {% endif %} +{% endmacro %} +import Foundation +#if canImport(AppKit) +import AppKit +#endif +#if canImport(UIKit) +import UIKit +#endif +#if canImport(SwiftUI) +import SwiftUI +#endif + +#if SWIFT_PACKAGE +private let resourceBundle = Bundle.module +#else +private class ResourceBundleClass {} +private let resourceBundle = Foundation.Bundle(for: ResourceBundleClass.self) +#endif + +// MARK: - Color Symbols + +@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *) +extension ColorTheme { + {% call allValuesBlock catalogs "color" %} +} + +// MARK: - Image Symbols + +@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *) +extension ImageTheme { + {% call allValuesBlock catalogs "image" %} +} + +// MARK: - Color Symbol Extensions + +#if canImport(AppKit) +@available(macOS 12.0, *) +@available(macCatalyst, unavailable) +public extension NSColor { + {% call extensionBlock catalogs "color" "NSColor" %} +} +#endif + +#if canImport(UIKit) +@available(iOS 15.0, tvOS 15.0, *) +@available(watchOS, unavailable) +public extension UIColor { + {% call extensionBlock catalogs "color" "UIColor" %} +} +#endif + +#if canImport(SwiftUI) +@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *) +public extension Color { + {% call extensionBlock catalogs "color" "Color" %} +} + +@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *) +public extension ShapeStyle where Self == Color { + {% call extensionBlock catalogs "color" "Color" %} +} +#endif + +// MARK: - Image Symbol Extensions - + +#if canImport(AppKit) +@available(macOS 12.0, *) +@available(macCatalyst, unavailable) +public extension NSImage { + {% call extensionBlock catalogs "image" "NSImage" %} +} +#endif + +#if canImport(UIKit) +@available(iOS 15.0, tvOS 15.0, *) +@available(watchOS, unavailable) +public extension UIImage { + {% call extensionBlock catalogs "image" "UIImage" %} +} +#endif + +#if canImport(SwiftUI) +@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *) +public extension Image { + {% call extensionBlock catalogs "image" "Image" %} +} +#endif + +// MARK: - Backwards Deployment Support - + +public struct ColorTheme: Hashable, Sendable { + public let name: String + public let bundle: Bundle + + public init(name: String, bundle: Bundle) { + self.name = name + self.bundle = bundle + } +} + +public struct ImageTheme: Hashable, Sendable { + public let name: String + public let bundle: Bundle + + public init(name: String, bundle: Bundle) { + self.name = name + self.bundle = bundle + } +} + +@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) +public extension Color { + init(theme: ColorTheme) { + self.init(theme.name, bundle: theme.bundle) + } +} + +@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) +public extension Color { + init(_ theme: ColorTheme) { + self.init(theme: theme) + } +} + +@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) +public extension Image { + init(theme: ImageTheme) { + self.init(theme.name, bundle: theme.bundle) + } +} + +@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) +public extension Image { + init(_ theme: ImageTheme) { + self.init(theme: theme) + } +} + +#if canImport(UIKit) +@available(iOS 11.0, tvOS 11.0, *) +public extension UIColor { + convenience init(theme: ColorTheme) { + self.init(named: theme.name, in: theme.bundle, compatibleWith: nil)! + } +} + +@available(iOS 11.0, tvOS 11.0, *) +public extension UIImage { + convenience init(theme: ImageTheme) { + self.init(named: theme.name, in: theme.bundle, compatibleWith: nil)! + } +} +#endif + +#if canImport(AppKit) +@available(macOS 10.13, *) +public extension NSColor { + convenience init(theme: ColorTheme) { + self.init(named: NSColor.Name(theme.name), bundle: theme.bundle)! + } +} + +@available(macOS 10.7, *) +public extension NSImage { + convenience init(theme: ImageTheme) { + self.init(named: NSImage.Name(theme.name))! + } +} +#endif +{% else %} +// No assets found +{% endif %} +// swiftlint:enable all diff --git a/SwiftLeedsPackage/Sources/SharedAssets/swiftgen.yml b/SwiftLeedsPackage/Sources/SharedAssets/swiftgen.yml new file mode 100644 index 0000000..11eebea --- /dev/null +++ b/SwiftLeedsPackage/Sources/SharedAssets/swiftgen.yml @@ -0,0 +1,9 @@ +input_dir: Resources +output_dir: ${DERIVED_SOURCES_DIR} + +xcassets: + inputs: + - . + outputs: + - templatePath: Templates/assets.stencil + output: Assets+Generated.swift diff --git a/SwiftLeedsPackage/Sources/SwiftLeedsCore/SwiftLeedsCore.swift b/SwiftLeedsPackage/Sources/SwiftLeedsCore/SwiftLeedsCore.swift index 8b13789..de958c7 100644 --- a/SwiftLeedsPackage/Sources/SwiftLeedsCore/SwiftLeedsCore.swift +++ b/SwiftLeedsPackage/Sources/SwiftLeedsCore/SwiftLeedsCore.swift @@ -1 +1 @@ - +// This file is needed to satisfy the compiler for an empty package