diff --git a/.github/workflows/unittestall.yml b/.github/workflows/unittestall.yml index 2321666..e41a4c0 100644 --- a/.github/workflows/unittestall.yml +++ b/.github/workflows/unittestall.yml @@ -26,13 +26,11 @@ jobs: - name: Test StylableSwiftUI shell: bash run: | - pushd Example set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace ${workspace} -scheme ${scheme} -destination "${destination}" - popd pod lib lint --allow-warnings env: destination: ${{ matrix.destination }} - scheme: "StylableSwiftUI-Example" + scheme: "StylableSwiftUI" workspace: "StylableSwiftUI.xcworkspace" ONLY_ACTIVE_ARCH: "NO" CODE_SIGN_IDENTITY: "" diff --git a/.gitignore b/.gitignore index 00f6018..abb3bf7 100644 --- a/.gitignore +++ b/.gitignore @@ -130,3 +130,4 @@ cobertura.xml # Python files for UITests *.pyc /.idea +.build diff --git a/Example/StylableSwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata similarity index 68% rename from Example/StylableSwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata index bdaef2e..919434a 100644 --- a/Example/StylableSwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/StylableSwiftUI.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/StylableSwiftUI.xcscheme new file mode 100644 index 0000000..1ef09a7 --- /dev/null +++ b/.swiftpm/xcode/xcshareddata/xcschemes/StylableSwiftUI.xcscheme @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Demo/StylableSwiftUI-Demo.xcodeproj/project.pbxproj b/Demo/StylableSwiftUI-Demo.xcodeproj/project.pbxproj new file mode 100644 index 0000000..e1f6531 --- /dev/null +++ b/Demo/StylableSwiftUI-Demo.xcodeproj/project.pbxproj @@ -0,0 +1,492 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1682B5242C175CB500D73706 /* StylableSwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1682B5232C175CA900D73706 /* StylableSwiftUI.framework */; }; + 1682B5252C175CB500D73706 /* StylableSwiftUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1682B5232C175CA900D73706 /* StylableSwiftUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; + 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; + 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; + 8F8F18A026B3FB4E00E83CE4 /* ThemedView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F8F189F26B3FB4E00E83CE4 /* ThemedView.swift */; }; + 8FB7656D28815A9A00857520 /* organism_element_like.json in Resources */ = {isa = PBXBuildFile; fileRef = 8FB7656A28815A9900857520 /* organism_element_like.json */; }; + 8FB7656E28815A9A00857520 /* like.json in Resources */ = {isa = PBXBuildFile; fileRef = 8FB7656B28815A9A00857520 /* like.json */; }; + 8FB7656F28815A9A00857520 /* dark_like.json in Resources */ = {isa = PBXBuildFile; fileRef = 8FB7656C28815A9A00857520 /* dark_like.json */; }; + A00F0FF623CCCE6200DDF587 /* ExampleViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = A00F0FF523CCCE6200DDF587 /* ExampleViews.swift */; }; + A00F0FF823CCD10400DDF587 /* Stylist+create.swift in Sources */ = {isa = PBXBuildFile; fileRef = A00F0FF723CCD10400DDF587 /* Stylist+create.swift */; }; + A021A58323D0C2E5003D57D8 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A021A58223D0C2E5003D57D8 /* SceneDelegate.swift */; }; + A021A58523D1D36F003D57D8 /* PreviewAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A08822D323D0990E000E8834 /* PreviewAssets.xcassets */; }; + A021A58823D1E1D7003D57D8 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A021A58A23D1E1D7003D57D8 /* Localizable.strings */; }; + A021A58E23D1E90D003D57D8 /* StyledListScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A021A58D23D1E90D003D57D8 /* StyledListScreen.swift */; }; + A0B8B62D23D0943C00A07971 /* SearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0B8B62C23D0943C00A07971 /* SearchBar.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 1682B5222C175CA900D73706 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1682B51E2C175CA900D73706 /* StylableSwiftUI.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 1682B4DE2C1759A700D73706; + remoteInfo = StylableSwiftUI; + }; + 8FACB8C42C2F1077009EE5AD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1682B51E2C175CA900D73706 /* StylableSwiftUI.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 8FACB8B02C2F0DF0009EE5AD; + remoteInfo = StylableSwiftUITests; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 1682B5262C175CB500D73706 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 1682B5252C175CB500D73706 /* StylableSwiftUI.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1682B51E2C175CA900D73706 /* StylableSwiftUI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = StylableSwiftUI.xcodeproj; path = ../StylableSwiftUI.xcodeproj; sourceTree = ""; }; + 607FACD01AFB9204008FA782 /* StylableSwiftUI_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StylableSwiftUI_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 8F8F189F26B3FB4E00E83CE4 /* ThemedView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemedView.swift; sourceTree = ""; }; + 8FB7656A28815A9900857520 /* organism_element_like.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = organism_element_like.json; sourceTree = ""; }; + 8FB7656B28815A9A00857520 /* like.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = like.json; sourceTree = ""; }; + 8FB7656C28815A9A00857520 /* dark_like.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = dark_like.json; sourceTree = ""; }; + A00F0FF523CCCE6200DDF587 /* ExampleViews.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleViews.swift; sourceTree = ""; }; + A00F0FF723CCD10400DDF587 /* Stylist+create.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Stylist+create.swift"; sourceTree = ""; }; + A021A58223D0C2E5003D57D8 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + A021A58923D1E1D7003D57D8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + A021A58D23D1E90D003D57D8 /* StyledListScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StyledListScreen.swift; sourceTree = ""; }; + A08822D323D0990E000E8834 /* PreviewAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = PreviewAssets.xcassets; sourceTree = ""; }; + A0B8B62C23D0943C00A07971 /* SearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchBar.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 607FACCD1AFB9204008FA782 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1682B5242C175CB500D73706 /* StylableSwiftUI.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1682B4CE2C174CFA00D73706 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1682B51E2C175CA900D73706 /* StylableSwiftUI.xcodeproj */, + ); + name = Frameworks; + sourceTree = ""; + }; + 1682B51F2C175CA900D73706 /* Products */ = { + isa = PBXGroup; + children = ( + 1682B5232C175CA900D73706 /* StylableSwiftUI.framework */, + 8FACB8C52C2F1077009EE5AD /* StylableSwiftUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 607FACC71AFB9204008FA782 = { + isa = PBXGroup; + children = ( + 607FACD21AFB9204008FA782 /* Demo */, + 607FACD11AFB9204008FA782 /* Products */, + 1682B4CE2C174CFA00D73706 /* Frameworks */, + ); + sourceTree = ""; + }; + 607FACD11AFB9204008FA782 /* Products */ = { + isa = PBXGroup; + children = ( + 607FACD01AFB9204008FA782 /* StylableSwiftUI_Example.app */, + ); + name = Products; + sourceTree = ""; + }; + 607FACD21AFB9204008FA782 /* Demo */ = { + isa = PBXGroup; + children = ( + 8FB7656928815A8D00857520 /* Animations */, + A021A58C23D1E82B003D57D8 /* Styling */, + A021A58B23D1E7D0003D57D8 /* Views */, + A08822CD23D097FC000E8834 /* Preview Content */, + 607FACD51AFB9204008FA782 /* AppDelegate.swift */, + A021A58223D0C2E5003D57D8 /* SceneDelegate.swift */, + 607FACDC1AFB9204008FA782 /* Images.xcassets */, + 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, + 607FACD31AFB9204008FA782 /* Supporting Files */, + A021A58A23D1E1D7003D57D8 /* Localizable.strings */, + ); + name = Demo; + path = StylableSwiftUI; + sourceTree = ""; + }; + 607FACD31AFB9204008FA782 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 607FACD41AFB9204008FA782 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 8FB7656928815A8D00857520 /* Animations */ = { + isa = PBXGroup; + children = ( + 8FB7656B28815A9A00857520 /* like.json */, + 8FB7656A28815A9900857520 /* organism_element_like.json */, + 8FB7656C28815A9A00857520 /* dark_like.json */, + ); + name = Animations; + sourceTree = ""; + }; + A021A58B23D1E7D0003D57D8 /* Views */ = { + isa = PBXGroup; + children = ( + A00F0FF523CCCE6200DDF587 /* ExampleViews.swift */, + A0B8B62C23D0943C00A07971 /* SearchBar.swift */, + A021A58D23D1E90D003D57D8 /* StyledListScreen.swift */, + 8F8F189F26B3FB4E00E83CE4 /* ThemedView.swift */, + ); + name = Views; + sourceTree = ""; + }; + A021A58C23D1E82B003D57D8 /* Styling */ = { + isa = PBXGroup; + children = ( + A00F0FF723CCD10400DDF587 /* Stylist+create.swift */, + ); + name = Styling; + sourceTree = ""; + }; + A08822CD23D097FC000E8834 /* Preview Content */ = { + isa = PBXGroup; + children = ( + A08822D323D0990E000E8834 /* PreviewAssets.xcassets */, + ); + name = "Preview Content"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 607FACCF1AFB9204008FA782 /* StylableSwiftUI_Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "StylableSwiftUI_Example" */; + buildPhases = ( + 607FACCC1AFB9204008FA782 /* Sources */, + 607FACCD1AFB9204008FA782 /* Frameworks */, + 607FACCE1AFB9204008FA782 /* Resources */, + 1682B5262C175CB500D73706 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = StylableSwiftUI_Example; + productName = SwiftUIStylist; + productReference = 607FACD01AFB9204008FA782 /* StylableSwiftUI_Example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 607FACC81AFB9204008FA782 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastSwiftUpdateCheck = 0830; + LastUpgradeCheck = 1530; + ORGANIZATIONNAME = CocoaPods; + TargetAttributes = { + 607FACCF1AFB9204008FA782 = { + CreatedOnToolsVersion = 6.3.1; + LastSwiftMigration = 1130; + }; + }; + }; + buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "StylableSwiftUI-Demo" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 607FACC71AFB9204008FA782; + productRefGroup = 607FACD11AFB9204008FA782 /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 1682B51F2C175CA900D73706 /* Products */; + ProjectRef = 1682B51E2C175CA900D73706 /* StylableSwiftUI.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 607FACCF1AFB9204008FA782 /* StylableSwiftUI_Example */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 1682B5232C175CA900D73706 /* StylableSwiftUI.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = StylableSwiftUI.framework; + remoteRef = 1682B5222C175CA900D73706 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 8FACB8C52C2F1077009EE5AD /* StylableSwiftUITests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = StylableSwiftUITests.xctest; + remoteRef = 8FACB8C42C2F1077009EE5AD /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 607FACCE1AFB9204008FA782 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8FB7656D28815A9A00857520 /* organism_element_like.json in Resources */, + A021A58523D1D36F003D57D8 /* PreviewAssets.xcassets in Resources */, + 8FB7656F28815A9A00857520 /* dark_like.json in Resources */, + 8FB7656E28815A9A00857520 /* like.json in Resources */, + A021A58823D1E1D7003D57D8 /* Localizable.strings in Resources */, + 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, + 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 607FACCC1AFB9204008FA782 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A021A58E23D1E90D003D57D8 /* StyledListScreen.swift in Sources */, + 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, + A00F0FF823CCD10400DDF587 /* Stylist+create.swift in Sources */, + A0B8B62D23D0943C00A07971 /* SearchBar.swift in Sources */, + A00F0FF623CCCE6200DDF587 /* ExampleViews.swift in Sources */, + 8F8F18A026B3FB4E00E83CE4 /* ThemedView.swift in Sources */, + A021A58323D0C2E5003D57D8 /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + 607FACDF1AFB9204008FA782 /* Base */, + ); + name = LaunchScreen.xib; + sourceTree = ""; + }; + A021A58A23D1E1D7003D57D8 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + A021A58923D1E1D7003D57D8 /* en */, + ); + name = Localizable.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 607FACED1AFB9204008FA782 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 607FACEE1AFB9204008FA782 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 607FACF01AFB9204008FA782 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_ASSET_PATHS = StylableSwiftUI/PreviewAssets.xcassets; + INFOPLIST_FILE = StylableSwiftUI/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MODULE_NAME = ExampleApp; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 607FACF11AFB9204008FA782 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_ASSET_PATHS = StylableSwiftUI/PreviewAssets.xcassets; + INFOPLIST_FILE = StylableSwiftUI/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MODULE_NAME = ExampleApp; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "StylableSwiftUI-Demo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 607FACED1AFB9204008FA782 /* Debug */, + 607FACEE1AFB9204008FA782 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "StylableSwiftUI_Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 607FACF01AFB9204008FA782 /* Debug */, + 607FACF11AFB9204008FA782 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 607FACC81AFB9204008FA782 /* Project object */; +} diff --git a/Demo/StylableSwiftUI-Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Demo/StylableSwiftUI-Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Demo/StylableSwiftUI-Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Example/StylableSwiftUI.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Demo/StylableSwiftUI-Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from Example/StylableSwiftUI.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Demo/StylableSwiftUI-Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Demo/StylableSwiftUI-Demo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Demo/StylableSwiftUI-Demo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..372c77d --- /dev/null +++ b/Demo/StylableSwiftUI-Demo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,15 @@ +{ + "originHash" : "0271592b24e5dc1185a09e3f2d980d55521827815d397c9bce8e63d502a51e84", + "pins" : [ + { + "identity" : "lottie-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/airbnb/lottie-ios.git", + "state" : { + "revision" : "769b88d83a42ca8d5572b020c96f47e3690b3796", + "version" : "4.4.3" + } + } + ], + "version" : 3 +} diff --git a/Example/StylableSwiftUI.xcodeproj/xcshareddata/xcbaselines/607FACE41AFB9204008FA782.xcbaseline/83513D3E-39AF-4A47-9FA7-E05D2ED44749.plist b/Demo/StylableSwiftUI-Demo.xcodeproj/xcshareddata/xcbaselines/607FACE41AFB9204008FA782.xcbaseline/83513D3E-39AF-4A47-9FA7-E05D2ED44749.plist similarity index 100% rename from Example/StylableSwiftUI.xcodeproj/xcshareddata/xcbaselines/607FACE41AFB9204008FA782.xcbaseline/83513D3E-39AF-4A47-9FA7-E05D2ED44749.plist rename to Demo/StylableSwiftUI-Demo.xcodeproj/xcshareddata/xcbaselines/607FACE41AFB9204008FA782.xcbaseline/83513D3E-39AF-4A47-9FA7-E05D2ED44749.plist diff --git a/Example/StylableSwiftUI.xcodeproj/xcshareddata/xcbaselines/607FACE41AFB9204008FA782.xcbaseline/94CC626E-2F83-49AA-B04A-8681A9B72AFD.plist b/Demo/StylableSwiftUI-Demo.xcodeproj/xcshareddata/xcbaselines/607FACE41AFB9204008FA782.xcbaseline/94CC626E-2F83-49AA-B04A-8681A9B72AFD.plist similarity index 100% rename from Example/StylableSwiftUI.xcodeproj/xcshareddata/xcbaselines/607FACE41AFB9204008FA782.xcbaseline/94CC626E-2F83-49AA-B04A-8681A9B72AFD.plist rename to Demo/StylableSwiftUI-Demo.xcodeproj/xcshareddata/xcbaselines/607FACE41AFB9204008FA782.xcbaseline/94CC626E-2F83-49AA-B04A-8681A9B72AFD.plist diff --git a/Example/StylableSwiftUI.xcodeproj/xcshareddata/xcbaselines/607FACE41AFB9204008FA782.xcbaseline/C6C089D8-49FD-4E72-AC12-3164803B7349.plist b/Demo/StylableSwiftUI-Demo.xcodeproj/xcshareddata/xcbaselines/607FACE41AFB9204008FA782.xcbaseline/C6C089D8-49FD-4E72-AC12-3164803B7349.plist similarity index 100% rename from Example/StylableSwiftUI.xcodeproj/xcshareddata/xcbaselines/607FACE41AFB9204008FA782.xcbaseline/C6C089D8-49FD-4E72-AC12-3164803B7349.plist rename to Demo/StylableSwiftUI-Demo.xcodeproj/xcshareddata/xcbaselines/607FACE41AFB9204008FA782.xcbaseline/C6C089D8-49FD-4E72-AC12-3164803B7349.plist diff --git a/Example/StylableSwiftUI.xcodeproj/xcshareddata/xcbaselines/607FACE41AFB9204008FA782.xcbaseline/Info.plist b/Demo/StylableSwiftUI-Demo.xcodeproj/xcshareddata/xcbaselines/607FACE41AFB9204008FA782.xcbaseline/Info.plist similarity index 100% rename from Example/StylableSwiftUI.xcodeproj/xcshareddata/xcbaselines/607FACE41AFB9204008FA782.xcbaseline/Info.plist rename to Demo/StylableSwiftUI-Demo.xcodeproj/xcshareddata/xcbaselines/607FACE41AFB9204008FA782.xcbaseline/Info.plist diff --git a/Example/StylableSwiftUI.xcodeproj/xcshareddata/xcschemes/StylableSwiftUI-Example.xcscheme b/Demo/StylableSwiftUI-Demo.xcodeproj/xcshareddata/xcschemes/StylableSwiftUI_Example.xcscheme similarity index 67% rename from Example/StylableSwiftUI.xcodeproj/xcshareddata/xcschemes/StylableSwiftUI-Example.xcscheme rename to Demo/StylableSwiftUI-Demo.xcodeproj/xcshareddata/xcschemes/StylableSwiftUI_Example.xcscheme index 2702fca..1567a0e 100644 --- a/Example/StylableSwiftUI.xcodeproj/xcshareddata/xcschemes/StylableSwiftUI-Example.xcscheme +++ b/Demo/StylableSwiftUI-Demo.xcodeproj/xcshareddata/xcschemes/StylableSwiftUI_Example.xcscheme @@ -1,10 +1,11 @@ + LastUpgradeVersion = "1530" + version = "1.7"> + buildImplicitDependencies = "YES" + buildArchitectures = "Automatic"> - - - - + ReferencedContainer = "container:StylableSwiftUI-Demo.xcodeproj"> @@ -41,17 +28,7 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES" - codeCoverageEnabled = "YES" - onlyGenerateCoverageForSpecifiedTargets = "YES"> - - - - + shouldAutocreateTestPlan = "YES"> @@ -60,7 +37,7 @@ BlueprintIdentifier = "607FACE41AFB9204008FA782" BuildableName = "StylableSwiftUI_Tests.xctest" BlueprintName = "StylableSwiftUI_Tests" - ReferencedContainer = "container:StylableSwiftUI.xcodeproj"> + ReferencedContainer = "container:StylableSwiftUI-Demo.xcodeproj"> @@ -82,7 +59,7 @@ BlueprintIdentifier = "607FACCF1AFB9204008FA782" BuildableName = "StylableSwiftUI_Example.app" BlueprintName = "StylableSwiftUI_Example" - ReferencedContainer = "container:StylableSwiftUI.xcodeproj"> + ReferencedContainer = "container:StylableSwiftUI-Demo.xcodeproj"> @@ -99,7 +76,7 @@ BlueprintIdentifier = "607FACCF1AFB9204008FA782" BuildableName = "StylableSwiftUI_Example.app" BlueprintName = "StylableSwiftUI_Example" - ReferencedContainer = "container:StylableSwiftUI.xcodeproj"> + ReferencedContainer = "container:StylableSwiftUI-Demo.xcodeproj"> diff --git a/Example/StylableSwiftUI/AppDelegate.swift b/Demo/StylableSwiftUI/AppDelegate.swift similarity index 100% rename from Example/StylableSwiftUI/AppDelegate.swift rename to Demo/StylableSwiftUI/AppDelegate.swift diff --git a/Example/StylableSwiftUI/Base.lproj/LaunchScreen.xib b/Demo/StylableSwiftUI/Base.lproj/LaunchScreen.xib similarity index 100% rename from Example/StylableSwiftUI/Base.lproj/LaunchScreen.xib rename to Demo/StylableSwiftUI/Base.lproj/LaunchScreen.xib diff --git a/Example/StylableSwiftUI/ExampleViews.swift b/Demo/StylableSwiftUI/ExampleViews.swift similarity index 100% rename from Example/StylableSwiftUI/ExampleViews.swift rename to Demo/StylableSwiftUI/ExampleViews.swift diff --git a/Example/StylableSwiftUI/Images.xcassets/AppIcon.appiconset/Contents.json b/Demo/StylableSwiftUI/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Example/StylableSwiftUI/Images.xcassets/AppIcon.appiconset/Contents.json rename to Demo/StylableSwiftUI/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/Example/StylableSwiftUI/Info.plist b/Demo/StylableSwiftUI/Info.plist similarity index 100% rename from Example/StylableSwiftUI/Info.plist rename to Demo/StylableSwiftUI/Info.plist diff --git a/Example/StylableSwiftUI/PreviewAssets.xcassets/*_*_close.imageset/003-cancel.png b/Demo/StylableSwiftUI/PreviewAssets.xcassets/*_*_close.imageset/003-cancel.png similarity index 100% rename from Example/StylableSwiftUI/PreviewAssets.xcassets/*_*_close.imageset/003-cancel.png rename to Demo/StylableSwiftUI/PreviewAssets.xcassets/*_*_close.imageset/003-cancel.png diff --git a/Example/StylableSwiftUI/PreviewAssets.xcassets/*_*_close.imageset/Contents.json b/Demo/StylableSwiftUI/PreviewAssets.xcassets/*_*_close.imageset/Contents.json similarity index 100% rename from Example/StylableSwiftUI/PreviewAssets.xcassets/*_*_close.imageset/Contents.json rename to Demo/StylableSwiftUI/PreviewAssets.xcassets/*_*_close.imageset/Contents.json diff --git a/Example/StylableSwiftUI/PreviewAssets.xcassets/Color.colorset/Contents.json b/Demo/StylableSwiftUI/PreviewAssets.xcassets/Color.colorset/Contents.json similarity index 100% rename from Example/StylableSwiftUI/PreviewAssets.xcassets/Color.colorset/Contents.json rename to Demo/StylableSwiftUI/PreviewAssets.xcassets/Color.colorset/Contents.json diff --git a/Example/StylableSwiftUI/PreviewAssets.xcassets/Contents.json b/Demo/StylableSwiftUI/PreviewAssets.xcassets/Contents.json similarity index 100% rename from Example/StylableSwiftUI/PreviewAssets.xcassets/Contents.json rename to Demo/StylableSwiftUI/PreviewAssets.xcassets/Contents.json diff --git a/Example/StylableSwiftUI/PreviewAssets.xcassets/searchbar_primarybutton_image.imageset/001-loupe.png b/Demo/StylableSwiftUI/PreviewAssets.xcassets/searchbar_primarybutton_image.imageset/001-loupe.png similarity index 100% rename from Example/StylableSwiftUI/PreviewAssets.xcassets/searchbar_primarybutton_image.imageset/001-loupe.png rename to Demo/StylableSwiftUI/PreviewAssets.xcassets/searchbar_primarybutton_image.imageset/001-loupe.png diff --git a/Example/StylableSwiftUI/PreviewAssets.xcassets/searchbar_primarybutton_image.imageset/Contents.json b/Demo/StylableSwiftUI/PreviewAssets.xcassets/searchbar_primarybutton_image.imageset/Contents.json similarity index 100% rename from Example/StylableSwiftUI/PreviewAssets.xcassets/searchbar_primarybutton_image.imageset/Contents.json rename to Demo/StylableSwiftUI/PreviewAssets.xcassets/searchbar_primarybutton_image.imageset/Contents.json diff --git a/Example/StylableSwiftUI/PreviewAssets.xcassets/searchbar_secondarybutton_image.imageset/002-ui.png b/Demo/StylableSwiftUI/PreviewAssets.xcassets/searchbar_secondarybutton_image.imageset/002-ui.png similarity index 100% rename from Example/StylableSwiftUI/PreviewAssets.xcassets/searchbar_secondarybutton_image.imageset/002-ui.png rename to Demo/StylableSwiftUI/PreviewAssets.xcassets/searchbar_secondarybutton_image.imageset/002-ui.png diff --git a/Example/StylableSwiftUI/PreviewAssets.xcassets/searchbar_secondarybutton_image.imageset/Contents.json b/Demo/StylableSwiftUI/PreviewAssets.xcassets/searchbar_secondarybutton_image.imageset/Contents.json similarity index 100% rename from Example/StylableSwiftUI/PreviewAssets.xcassets/searchbar_secondarybutton_image.imageset/Contents.json rename to Demo/StylableSwiftUI/PreviewAssets.xcassets/searchbar_secondarybutton_image.imageset/Contents.json diff --git a/Example/StylableSwiftUI/PreviewAssets.xcassets/searchbar_tertiarybutton_close.imageset/003-cancel.png b/Demo/StylableSwiftUI/PreviewAssets.xcassets/searchbar_tertiarybutton_close.imageset/003-cancel.png similarity index 100% rename from Example/StylableSwiftUI/PreviewAssets.xcassets/searchbar_tertiarybutton_close.imageset/003-cancel.png rename to Demo/StylableSwiftUI/PreviewAssets.xcassets/searchbar_tertiarybutton_close.imageset/003-cancel.png diff --git a/Example/StylableSwiftUI/PreviewAssets.xcassets/searchbar_tertiarybutton_close.imageset/Contents.json b/Demo/StylableSwiftUI/PreviewAssets.xcassets/searchbar_tertiarybutton_close.imageset/Contents.json similarity index 100% rename from Example/StylableSwiftUI/PreviewAssets.xcassets/searchbar_tertiarybutton_close.imageset/Contents.json rename to Demo/StylableSwiftUI/PreviewAssets.xcassets/searchbar_tertiarybutton_close.imageset/Contents.json diff --git a/Example/StylableSwiftUI/SceneDelegate.swift b/Demo/StylableSwiftUI/SceneDelegate.swift similarity index 100% rename from Example/StylableSwiftUI/SceneDelegate.swift rename to Demo/StylableSwiftUI/SceneDelegate.swift diff --git a/Example/StylableSwiftUI/SearchBar.swift b/Demo/StylableSwiftUI/SearchBar.swift similarity index 100% rename from Example/StylableSwiftUI/SearchBar.swift rename to Demo/StylableSwiftUI/SearchBar.swift diff --git a/Example/StylableSwiftUI/StyledListScreen.swift b/Demo/StylableSwiftUI/StyledListScreen.swift similarity index 100% rename from Example/StylableSwiftUI/StyledListScreen.swift rename to Demo/StylableSwiftUI/StyledListScreen.swift diff --git a/Example/StylableSwiftUI/Stylist+create.swift b/Demo/StylableSwiftUI/Stylist+create.swift similarity index 100% rename from Example/StylableSwiftUI/Stylist+create.swift rename to Demo/StylableSwiftUI/Stylist+create.swift diff --git a/Example/StylableSwiftUI/ThemedView.swift b/Demo/StylableSwiftUI/ThemedView.swift similarity index 100% rename from Example/StylableSwiftUI/ThemedView.swift rename to Demo/StylableSwiftUI/ThemedView.swift diff --git a/Example/StylableSwiftUI/dark_like.json b/Demo/StylableSwiftUI/dark_like.json similarity index 100% rename from Example/StylableSwiftUI/dark_like.json rename to Demo/StylableSwiftUI/dark_like.json diff --git a/Example/StylableSwiftUI/en.lproj/Localizable.strings b/Demo/StylableSwiftUI/en.lproj/Localizable.strings similarity index 100% rename from Example/StylableSwiftUI/en.lproj/Localizable.strings rename to Demo/StylableSwiftUI/en.lproj/Localizable.strings diff --git a/Example/StylableSwiftUI/like.json b/Demo/StylableSwiftUI/like.json similarity index 100% rename from Example/StylableSwiftUI/like.json rename to Demo/StylableSwiftUI/like.json diff --git a/Example/StylableSwiftUI/organism_element_like.json b/Demo/StylableSwiftUI/organism_element_like.json similarity index 100% rename from Example/StylableSwiftUI/organism_element_like.json rename to Demo/StylableSwiftUI/organism_element_like.json diff --git a/Example/Podfile b/Example/Podfile deleted file mode 100644 index 6ef894d..0000000 --- a/Example/Podfile +++ /dev/null @@ -1,13 +0,0 @@ -use_frameworks! -platform :ios, '14.0' - -target 'StylableSwiftUI_Example' do - pod 'StylableSwiftUI/Animated', :path => '../' - pod 'SwiftLint' - - target 'StylableSwiftUI_Tests' do - inherit! :search_paths - - - end -end diff --git a/Example/Podfile.lock b/Example/Podfile.lock deleted file mode 100644 index 72d226b..0000000 --- a/Example/Podfile.lock +++ /dev/null @@ -1,29 +0,0 @@ -PODS: - - lottie-ios (4.2.0) - - StylableSwiftUI/Animated (3.0.0): - - lottie-ios - - StylableSwiftUI/Core - - StylableSwiftUI/Core (3.0.0) - - SwiftLint (0.52.4) - -DEPENDENCIES: - - StylableSwiftUI/Animated (from `../`) - - SwiftLint - -SPEC REPOS: - trunk: - - lottie-ios - - SwiftLint - -EXTERNAL SOURCES: - StylableSwiftUI: - :path: "../" - -SPEC CHECKSUMS: - lottie-ios: 809ecf2d460ed650a6aed7aa88b2ec45fab4779c - StylableSwiftUI: 949269198a7e56ff8874f644319d12b10dc3fa75 - SwiftLint: 1cc5cd61ba9bacb2194e340aeb47a2a37fda00b3 - -PODFILE CHECKSUM: 3eedd21623312536da46ad6fb7f13732d92f872f - -COCOAPODS: 1.12.1 diff --git a/Example/Pods/Local Podspecs/StylableSwiftUI.podspec.json b/Example/Pods/Local Podspecs/StylableSwiftUI.podspec.json deleted file mode 100644 index d7a4886..0000000 --- a/Example/Pods/Local Podspecs/StylableSwiftUI.podspec.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "StylableSwiftUI", - "version": "3.0.0", - "summary": "StylableSwiftUI - Style SwifTUI apps and libraries", - "description": "Easily tag a SwiftUI library so it can be styled by multiple apps.", - "homepage": "https://github.com/design-ops/stylable-swiftUI", - "license": { - "type": "MIT" - }, - "authors": "deanWombourne", - "source": { - "git": "https://github.com/design-ops/stylable-swiftUI.git", - "tag": "v3.0.0" - }, - "swift_versions": "5.8", - "platforms": { - "ios": "14.0" - }, - "default_subspecs": "Core", - "subspecs": [ - { - "name": "Core", - "source_files": "StylableSwiftUI/Classes/Core/**/*{.swift}" - }, - { - "name": "Animated", - "dependencies": { - "StylableSwiftUI/Core": [ - - ], - "lottie-ios": [ - - ] - }, - "source_files": "StylableSwiftUI/Classes/Animated/**/*{.swift}" - } - ], - "swift_version": "5.8" -} diff --git a/Example/Pods/Local Podspecs/SwiftUIStylist.podspec.json b/Example/Pods/Local Podspecs/SwiftUIStylist.podspec.json deleted file mode 100644 index 61a5869..0000000 --- a/Example/Pods/Local Podspecs/SwiftUIStylist.podspec.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "SwiftUIStylist", - "version": "0.1.0", - "summary": "A short description of SwiftUIStylist.", - "description": "TODO: Add long description of the pod here.", - "homepage": "https://github.com/deanWombourne/SwiftUIStylist", - "license": { - "type": "MIT", - "file": "LICENSE" - }, - "authors": { - "deanWombourne": "deanWombourne@gmail.com" - }, - "source": { - "git": "https://github.com/deanWombourne/SwiftUIStylist.git", - "tag": "0.1.0" - }, - "swift_versions": "5.0", - "platforms": { - "ios": "13.0" - }, - "source_files": "SwiftUIStylist/Classes/**/*", - "swift_version": "5.0" -} diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock deleted file mode 100644 index 72d226b..0000000 --- a/Example/Pods/Manifest.lock +++ /dev/null @@ -1,29 +0,0 @@ -PODS: - - lottie-ios (4.2.0) - - StylableSwiftUI/Animated (3.0.0): - - lottie-ios - - StylableSwiftUI/Core - - StylableSwiftUI/Core (3.0.0) - - SwiftLint (0.52.4) - -DEPENDENCIES: - - StylableSwiftUI/Animated (from `../`) - - SwiftLint - -SPEC REPOS: - trunk: - - lottie-ios - - SwiftLint - -EXTERNAL SOURCES: - StylableSwiftUI: - :path: "../" - -SPEC CHECKSUMS: - lottie-ios: 809ecf2d460ed650a6aed7aa88b2ec45fab4779c - StylableSwiftUI: 949269198a7e56ff8874f644319d12b10dc3fa75 - SwiftLint: 1cc5cd61ba9bacb2194e340aeb47a2a37fda00b3 - -PODFILE CHECKSUM: 3eedd21623312536da46ad6fb7f13732d92f872f - -COCOAPODS: 1.12.1 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj deleted file mode 100644 index 07764ae..0000000 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ /dev/null @@ -1,2062 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXAggregateTarget section */ - 52B60EC2A583F24ACBB69C113F5488B9 /* SwiftLint */ = { - isa = PBXAggregateTarget; - buildConfigurationList = AE7B4FB01588B9E6DF09CB79FC7CE7BD /* Build configuration list for PBXAggregateTarget "SwiftLint" */; - buildPhases = ( - ); - dependencies = ( - ); - name = SwiftLint; - }; -/* End PBXAggregateTarget section */ - -/* Begin PBXBuildFile section */ - 02D01ECCCD825E0B74B86AE0921A3CEC /* LottieAnimationCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1602402F8CAEE21DE695BA04ACF165A8 /* LottieAnimationCache.swift */; }; - 03B6BE2C793965ED36A9778F1315CF7D /* LottieAnimationViewBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB85F37B82C841B6E3C2F465EB3583C0 /* LottieAnimationViewBase.swift */; }; - 03E8748B25EF08DE80D6C077424C0E95 /* ShapeItemLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = E855DB375C7F524DED234395D11CA685 /* ShapeItemLayer.swift */; }; - 08950E07EDC6A1E24424DE17DF80BB45 /* Asset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28F4A3F5E81F7333E50CA0EC76A6DF98 /* Asset.swift */; }; - 08AD790AE1BC781B669D2C3C8153F00B /* PassThroughOutputNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64452E5A53D7ECF74159CC822D870E91 /* PassThroughOutputNode.swift */; }; - 090D76D78710E22FCC59FB6F1E182853 /* Archive+WritingDeprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66DDB7768F30960D4C02F16C0051F431 /* Archive+WritingDeprecated.swift */; }; - 09947D686FC5D6EC6AC8A7D91A831ADE /* ColorValueProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA19A14438B5CDCBD305AE559EBF010B /* ColorValueProvider.swift */; }; - 0AA357BAABE086DC675CA83F909651F4 /* LottieColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27A4C6C08A4C12ADEE60E0656C735428 /* LottieColor.swift */; }; - 0BE2B958696379FA94E4A358D8988160 /* TextLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = A58A00F5CA69F312B32665D9FB60CA74 /* TextLayer.swift */; }; - 0C30F154BE861E1E692C73A371BB528C /* GroupNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 655BE3AC3BBDF289257FB5E619A99007 /* GroupNode.swift */; }; - 0CA33A4686554531532350E83D86296D /* EllipseNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4805880B15F5B22FDEE4FCD3D1F64E69 /* EllipseNode.swift */; }; - 0D01C7F13F5A52BF2FE0CDE94A6F6165 /* BezierPathRoundExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2956630ECEDACC0F465F674259E62A06 /* BezierPathRoundExtension.swift */; }; - 10FD3521AD5FC225F88536AA0BB3A824 /* FileManager+ZIP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DEB47F5C01CF8490BCFD30F1D70D8E8 /* FileManager+ZIP.swift */; }; - 110CFE00581EBCC12FAA1B58DF9830C4 /* GradientAnimations.swift in Sources */ = {isa = PBXBuildFile; fileRef = D225DAD71A0984582FFC08D4F1A269CE /* GradientAnimations.swift */; }; - 141507E0816A2DF85CEFB13D53753FCD /* MathKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DD9BD35B7E1EF4BD59AD8203A803D0B /* MathKit.swift */; }; - 146091434F9D4560BCCD633BDAFAA2A2 /* AnimationLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB88885EE720E02175B70BA43D82B8D6 /* AnimationLayer.swift */; }; - 14D2FFA3FDB2E0F79E197F38D2C98902 /* AnimatorNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = B197F95D0FB8F2408171B5FD7F8FB0FB /* AnimatorNode.swift */; }; - 1629D2507FAEF3A958EDB1E92CABC962 /* ShapeLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = C38F2EC7CF5E8AD41B8FAB241E17CD8B /* ShapeLayer.swift */; }; - 16B2D86C809C74806A09BA41DFAC90BC /* CGFloatExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 410F6554B7D5CD374986DF597E1CB849 /* CGFloatExtensions.swift */; }; - 16DE331A244871168384A865F307C4C4 /* PathOutputNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D1D13684378C6C7B85D9C0C5444F80 /* PathOutputNode.swift */; }; - 16E4575589BF0B2B23F635CDF7AB465C /* ImageAsset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79D58E782A4FEB5B1AB1A248F857A452 /* ImageAsset.swift */; }; - 1A67466B15A88B9109AF63A30A114230 /* Entry+Serialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3393261BD09B5830EC8DA5A14E129A2 /* Entry+Serialization.swift */; }; - 1AC296837573B6EF3074BA288113F821 /* AnimationContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 427C2A4415D436636E0222B1D1F2FAB7 /* AnimationContext.swift */; }; - 1AF57C7A60AE67FED41A323CA02EFA0E /* SizeValueProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E9574D70626EF1953D672B9697FEA46 /* SizeValueProvider.swift */; }; - 1BAD3EBB68E8C433438EB240A79BB77A /* RoundedCorners.swift in Sources */ = {isa = PBXBuildFile; fileRef = C70399940B2AB7BA6AD10FB01276A62C /* RoundedCorners.swift */; }; - 1C8FAD5B328D9D3693FA9E93AEA7F4EF /* NodeProperty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DB7800CC2768F722E271D886A5986FC /* NodeProperty.swift */; }; - 1CA5156001688D549123A03CD604EC29 /* DotLottieImageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = B265AB034C62B0BFD1E9E783871705BF /* DotLottieImageProvider.swift */; }; - 1CD9878CCFF1CC718717F77B0DE74CC3 /* AssetLibrary.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7A84A8285CF7AA3A98ACE2E791CE931 /* AssetLibrary.swift */; }; - 1D7C4855617FC2915151651804D940DB /* SolidLayerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5142FAFF92184807A3E8DCE2A4F5BC4D /* SolidLayerModel.swift */; }; - 20CC8720FE3B3B84DB3703FB7822F36C /* Entry+ZIP64.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F453944467880597DD001CBF6AF6CF9 /* Entry+ZIP64.swift */; }; - 23C0C453BB23FB6C7B6BAEC891F8D162 /* GradientFillNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6790AF1EA295E7FA8A4C3B569903BC55 /* GradientFillNode.swift */; }; - 23C9BC23FFDD34088E2ACF0A07169233 /* LottieLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22B282ECA91D04DC2A3C365CD20C2FC6 /* LottieLogger.swift */; }; - 23EA0BAD9F4576488308486EF1EE68CD /* LayerTransformNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BADE19128CCD5CA2FF95B6628CC7057 /* LayerTransformNode.swift */; }; - 24151A81BB69793755117954FCF5C800 /* Interpolatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5867C58A0C73144430774A1316DC4AE /* Interpolatable.swift */; }; - 24826A2FFABFCE32EC398DB906CACAF4 /* ShapeRenderLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80ED95B074263139503ED9EB09946042 /* ShapeRenderLayer.swift */; }; - 2485276A507C2902C986CA3B2FBA51A0 /* LayerTextProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45184BDE668BD817DFAF090B3E7F7F22 /* LayerTextProvider.swift */; }; - 26D06F9703728B8F083F1D7FB9FB1E28 /* PolygonNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA9686B9917AC05A8CBD492881A55AF6 /* PolygonNode.swift */; }; - 26F503CA9F9371AB84A7A9533866B599 /* Archive+Writing.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9690E429EE5142965B6B5864E0BA45E /* Archive+Writing.swift */; }; - 270FCE2492A27DF6A080D0B2FC5AF8B4 /* Shape.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB94B17435098D702C5D61BB233030AA /* Shape.swift */; }; - 2A394FCBD1DA381AC8C4CED87BB3A2EF /* CompatibleAnimationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96B1CC369AF58D38706D8A35EDBC98BE /* CompatibleAnimationView.swift */; }; - 2B079B8AE100F49358AC476593D5C51A /* KeyframeGroup+exactlyOneKeyframe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E24C849FAE0005C0F71C2956A650E94 /* KeyframeGroup+exactlyOneKeyframe.swift */; }; - 2B51D40BB08E27B0B027FA6531462173 /* CGPointExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 894D17A79761C94C924A53F563EB150E /* CGPointExtension.swift */; }; - 2B86F47B3AF6AF0927B831BC9628F6A0 /* InterpolatableExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E054A240EEC6DD8B3F9E68BB1F933C8 /* InterpolatableExtensions.swift */; }; - 2BC4685CB8B97D9205AAE955634FF0AD /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04D60AC13D33197690A05C641925DDDA /* UIKit.framework */; }; - 2C5E4C32B7A7D3871C8C63811FFFA8AD /* lottie-ios-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CFCBACA305525B5FD0767C4AFF31E40 /* lottie-ios-dummy.m */; }; - 2C9F4C5AB9896037313D097054ACE182 /* AnimatedView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1681737DF82EB21510ED77275272363 /* AnimatedView.swift */; }; - 2D948FDB771F5A5AA500924C97862F38 /* DotLottieManifest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92A3CE9639E1020EB4B1BFBC3BB39C76 /* DotLottieManifest.swift */; }; - 2DA87FFE3F767E349252E51ADC5379B6 /* Archive+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C2AB118BADEABE2FD0BE198C4F91DB1 /* Archive+Helpers.swift */; }; - 2EE70950C8F4D0539D8E240C8A772012 /* CombinedShapeAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D0FE6816E4D3E5029E24076602A0E35 /* CombinedShapeAnimation.swift */; }; - 30DC1322A4EF8167FC73A0FB75AD1C8A /* TransformLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = C065A92A4856CC2DB6DB244CAC3A30AE /* TransformLayer.swift */; }; - 3660E77E00A3E25C3DD240ECFAE0B9BA /* Ellipse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A777B66E6E54AB58F3AE649FC1216BA /* Ellipse.swift */; }; - 367BD2746586FD565E5C31FB06AC342F /* KeyframeExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1911DCEB23CB37CA72A6F8E78379F159 /* KeyframeExtensions.swift */; }; - 36D6D176BA990A4D094C3E96D628506D /* CachedImageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF6A987B215E4DD52A4C0F8C51345BD4 /* CachedImageProvider.swift */; }; - 371943F29EC377DB6CBC63D859D6562E /* Archive+ReadingDeprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4ECFFFB7C1BD882046A2E8F945BA1173 /* Archive+ReadingDeprecated.swift */; }; - 3857C9DCBD7D4B410A2B3507ADD57330 /* AnyValueProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1DDA8F3ADD379F0DB8A5DA88869D309 /* AnyValueProvider.swift */; }; - 39BF8DFF46375887445074B297CA9D38 /* Star.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C2209A5E70F2497ED9341B6A84E86F9 /* Star.swift */; }; - 3A5A7E8D0EFA6BE61ECBB92C84C5250E /* DefaultAnimationCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7E5F4C31D611ED8D99F0643BA58FD87 /* DefaultAnimationCache.swift */; }; - 3DB4CE08417D765D38EB14DF6B533DD8 /* PreCompositionLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30F26CFA7FD328979FB7546B9C6C44CA /* PreCompositionLayer.swift */; }; - 3E856F516C697C80DB808A578A301555 /* Fill.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3454023F37858BA68A8CDC7DC0C5241 /* Fill.swift */; }; - 3FCF1B417CDA4B2A2B9261BB5CAB128E /* CALayer+setupLayerHierarchy.swift in Sources */ = {isa = PBXBuildFile; fileRef = D104DE562992F0AEBED5664153E99598 /* CALayer+setupLayerHierarchy.swift */; }; - 4023ADC9F4CD4A4074D2BC2918BB8308 /* KeyframeData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CCF288742A5EF8F4C0EBBB95DF964BD /* KeyframeData.swift */; }; - 402C14041C16867B0C53EBF05DBB4D68 /* UIKitStyleContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8705A9991518B7B89E59F0C2170CE83 /* UIKitStyleContainer.swift */; }; - 40C943C891FB76641DC4F5706D228930 /* PointValueProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = C69CC6A8D77FC3AB0AD3B2EA9ED25AEF /* PointValueProvider.swift */; }; - 42B296D09113E31285B1C07D3F193821 /* AnyValueContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACC2B61039887F638597C27AB420F5C5 /* AnyValueContainer.swift */; }; - 43130465ADA5D107A83EF8632199A16E /* StylableGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 981F91999F107CBBB43FEECAC8A91E45 /* StylableGroup.swift */; }; - 432001A8B744E58A19D0A25F0A29F8E9 /* Data+Serialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE6B10FC9B6553E833B4B741AC706574 /* Data+Serialization.swift */; }; - 43DEC4280E493C54F7A7628BC7CF7990 /* AnimatedButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = E74517BA80494683913698A996545664 /* AnimatedButton.swift */; }; - 44995988E971B6981F6F42BF6A27242B /* RectangleAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37CD009FE68D83B338431A5D54EBD837 /* RectangleAnimation.swift */; }; - 47AE0FD3ACB6E1B81D0BF3DB95ED55AA /* PreCompLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEE4296A2044CDB4CE9111940229C77C /* PreCompLayer.swift */; }; - 483D3AF312BDB4D0C92E725EE937094A /* KeypathSearchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61AD68895278FFE4EC86F446A30AA2D8 /* KeypathSearchable.swift */; }; - 497F24F21140F4D5F388E3A997B6F491 /* StylableSwiftUI-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A97076C2FD6DF803D0CE41C2E59F4758 /* StylableSwiftUI-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4A59452F1FD20D993C02AEE78B838815 /* DotLottieCacheProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1253B1031382929A684699D3207EE5E4 /* DotLottieCacheProvider.swift */; }; - 4BAF8BA7CBF4A8E5673C287B11468CB2 /* Entry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B9AFEAC4B3361B5BCC1A7E4C9D84E49 /* Entry.swift */; }; - 4D5D7F668A018FBBED4585E30B4DE6E8 /* PathElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A3855A0E688003F387191CB7B030B75 /* PathElement.swift */; }; - 4EF3446BBB59F042304456AF4B3674BA /* StarNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB94DEAE23EA9E2FE91F0BA4CDCEB0AC /* StarNode.swift */; }; - 4F220F69C8FEA7B4FD6D16C5F786FD9A /* TextDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FB503F0443198EB9CF8BCEFF1FC2851 /* TextDocument.swift */; }; - 4FBE9B2F5765C0A74D198B326F9FDA84 /* CGColor+RGB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D3116184EBD150817DD4FC95D111A5C /* CGColor+RGB.swift */; }; - 508F2DB3F3264E9AB74302ABBF92175C /* CurveVertex.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04997492E5064C8892D86EE8B2366F8 /* CurveVertex.swift */; }; - 509E81FB8300B03C869CC7E0E04FC623 /* Trim.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F18E39E30BFC2753D9AA1285A15756 /* Trim.swift */; }; - 534169A16DA9E1DA272A7A1F60FB4D66 /* LottieAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 685FA9AD07F15710B4C0162C3908B6A7 /* LottieAnimation.swift */; }; - 535F6586DBD712AAF0F66DD959A77132 /* LayerModel+makeAnimationLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE70B381A5AED2BE1D5295F3B36E0E17 /* LayerModel+makeAnimationLayer.swift */; }; - 53D3F555CE45CB0FA6AE70C1B310041C /* BaseAnimationLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B931CB344275A89B58D4972A6F8F8C1C /* BaseAnimationLayer.swift */; }; - 53E968FBD8D97552852210C7C2DFA243 /* EllipseAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92BEBF1A2DF4475C8370B1886AC9F0C1 /* EllipseAnimation.swift */; }; - 5465DE810317F4CCB5EB410E552CBF1C /* LegacyGradientFillRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6CB812610667A32952B63FFF7D1C179 /* LegacyGradientFillRenderer.swift */; }; - 55903A2678A9ED5B6D0772922CC43CDE /* Glyph.swift in Sources */ = {isa = PBXBuildFile; fileRef = 690576955D994308284C9490EFA17D64 /* Glyph.swift */; }; - 55A4E5D7362F024C87F18E3AFDF929BC /* Repeater.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB49ECB1CE9BC857C544BE182C20A526 /* Repeater.swift */; }; - 5775E8FD990EEDEC7903B2BCBAEF98F1 /* AnimatedSwitch.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFCD7E832A05E73DD358E082FB5E700A /* AnimatedSwitch.swift */; }; - 5806B72F22638A6008231EA9EF1C91E3 /* KeyedDecodingContainerExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E16B67A667AE9828C76FA09992750367 /* KeyedDecodingContainerExtensions.swift */; }; - 5889E65DF4B2C05A17907BAF8FAF514A /* ColorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4061C485992396262E9EEBED2962BB7C /* ColorExtension.swift */; }; - 589C68C8879BA0F8FE093228BA0331A5 /* InvertedMatteLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21202759E0FA0092041253D3012D6E33 /* InvertedMatteLayer.swift */; }; - 5A35A33E39F5CC0D6DCDF3F5B28C589A /* Transform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50C9B48E6A456887593D058FC1A34252 /* Transform.swift */; }; - 5A4C9C20AFADB3E56ED6B095DE9BF10B /* StylableAnimatedView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0933AF34B2F793722820CD9AB54760A /* StylableAnimatedView.swift */; }; - 5AEA51E02EAA5598B98A93FA7C9BA041 /* LottieAnimationViewInitializers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FC22E98B82B7503366D2097E29513C7 /* LottieAnimationViewInitializers.swift */; }; - 5BB0A27F06C0597D7C371991C7EB4F36 /* ImageCacheKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5DE2F19AA3845094A0B570B7C07481B /* ImageCacheKey.swift */; }; - 5BBF4D92127617EC39FB20C4895D010B /* LayerDebugging.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBA5B3ABB76CB716FC85F75FB990E200 /* LayerDebugging.swift */; }; - 5C400981E989E63EEC2F7EB260BBDF55 /* DotLottieAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB9389E47C69B08C8EC19C16E8C1A000 /* DotLottieAnimation.swift */; }; - 5D930C4A3DEB081B9B9B63484E637442 /* ThemedStylistIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 303EAB1A6C8E2F016E13802007730066 /* ThemedStylistIdentifier.swift */; }; - 5FE79F40296EF6B5FE33DE3669CD6435 /* AnyNodeProperty.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFF8464A45E2C7F7654D994AF648AC2B /* AnyNodeProperty.swift */; }; - 6111C8B8397457F2D015A748619DD14D /* GradientStrokeRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 621C85D310F83D7028749A9ACEE3D98F /* GradientStrokeRenderer.swift */; }; - 616AF83AD79BFD3833BD336E2DD34004 /* UIColorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78CF1ED20F1995AA06DE9CB6D440C19C /* UIColorExtension.swift */; }; - 625AA4402F6AB533D49C2B42AD73F59F /* BlendMode+Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE7155A358A846722D6D3E525F62CE3E /* BlendMode+Filter.swift */; }; - 625F9CE86EB74426C1FF9C3523D2D10C /* CoreAnimationLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71FA9DD23C9D07F4C3C58E550F48D968 /* CoreAnimationLayer.swift */; }; - 64CC8EF0FF2DE9F351FE889D2F02E38C /* RenderNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B9C3B8641E38BF0043867A788B3C3BD /* RenderNode.swift */; }; - 6546CAAD7AB2027E0B5FECF70C8D0068 /* LottieAnimationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A08F02545DED91877ACCC02A7030DBC6 /* LottieAnimationView.swift */; }; - 66DEE8AA32FD358FF8CFF7B0AB9CC4F2 /* StylableSwiftUI-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 13D8A40C94913A926E6DFCDD3B69E11E /* StylableSwiftUI-dummy.m */; }; - 67AECFC096F0C9F416E4D7068E524C10 /* GradientRenderLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A36AA71A56A88293C9341811F490663 /* GradientRenderLayer.swift */; }; - 69ADFBED3E53E133A70CBCADDFC66444 /* WithStyleIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25CE74F193121F6D4A2AD188E582A752 /* WithStyleIdentifier.swift */; }; - 69DF936A6D86ACA1498053220BA8420F /* CoreTextRenderLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A6336F632C2FC71A4F67E3DD6F7032A /* CoreTextRenderLayer.swift */; }; - 6BB97E3304586A85D51FEEDBCC3C9BE8 /* InfiniteOpaqueAnimationLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6500C68360C37E4CE72AA9E50229D2E /* InfiniteOpaqueAnimationLayer.swift */; }; - 6BCDE862CC5C896043DFB88F4C1056DE /* BundleImageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53FE7236641CC3A043656BFC31493040 /* BundleImageProvider.swift */; }; - 6D227B67A3DF9BA7EFE03D6C927D971E /* PrecompAsset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 438F330404FBC73C2428A5F827736977 /* PrecompAsset.swift */; }; - 6E156D9B720CEA8270D508C68EDB4376 /* BaseCompositionLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB3B4D211235F44157232DB1C9667D1F /* BaseCompositionLayer.swift */; }; - 6E952D2C7BA8DC6C628F32B6F34CE5DB /* LayerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA324DEE8CC2750C646F874285C6F52 /* LayerModel.swift */; }; - 722333529FA3DD8B437D491C1555C310 /* ImageCompositionLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEB0522A3914477D6A8A561B81ADF280 /* ImageCompositionLayer.swift */; }; - 7314F2B3C7644910A77DEEEDB5AC2950 /* Theme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11BBA994A987D4E0260FAEE537AD935C /* Theme.swift */; }; - 7376FE441B8895961823C0FD9B0E49F1 /* LayerImageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 025931CA8280187F6188A307483A072B /* LayerImageProvider.swift */; }; - 7379636F79F9B22014359FB1EFC7922C /* RectNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C10BD553FFC30327E9957405377BE85 /* RectNode.swift */; }; - 750B13EFC7C833999CD772476EBF2DBC /* ShapeNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE1C610834AD81018C739D6A81F0A51F /* ShapeNode.swift */; }; - 77F17C92762938C79E540DDEBDA49689 /* MaskContainerLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8B54BB8BB44B79D37E2BD7A56E354DF /* MaskContainerLayer.swift */; }; - 7881133228690E2573EFD4211C07464E /* FillRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDA58E6521C53473476AD7BB70F5E30A /* FillRenderer.swift */; }; - 79E4CF79E12322F10175CB2E4428B4CF /* StylableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC33B5FCD5BFFFA72E81F432E1ADA216 /* StylableView.swift */; }; - 7A9F577EFA781AA5B36C2FBAF0ABD1B0 /* AnimationFontProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A33462BE2CFD5A9EB5F99E734E43B41 /* AnimationFontProvider.swift */; }; - 7B01DBEB89B820C8294341814A332BCF /* LRUAnimationCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5773466217AC6458C99D06514DEC3658 /* LRUAnimationCache.swift */; }; - 7B1F24E382D3841703472CB935E99BF9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79CF7D56C5D50C18B2EA0ED106D998C7 /* Foundation.framework */; }; - 7B91E1E168A78CCBCCC9667447C3655C /* FloatValueProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31791B2E1B89F1553A5EBB031FEE0CFA /* FloatValueProvider.swift */; }; - 7C5FB48D1BEF0E601DF4DE72F8976F35 /* TextAnimatorNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AD83FC271EBC525F28763724D3FBB64 /* TextAnimatorNode.swift */; }; - 7D4323BE6C60CF056FFE08510F65A380 /* RepeaterLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90F3273253250267E9C717109E851CE6 /* RepeaterLayer.swift */; }; - 7D4CEDF5C98CABE00BBE56682430D059 /* StrokeRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FC331E6497011946B78CC64FFF284B4 /* StrokeRenderer.swift */; }; - 7F5F1D604005F2EF8F30785301144A8D /* DotLottieConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 280579E6328833F20052AA3E19A52C98 /* DotLottieConfiguration.swift */; }; - 8121C55805F65A14548F474CB957A378 /* AnimationSubview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 190559FCF8041CCD9284DBA67BFF77A9 /* AnimationSubview.swift */; }; - 8145F62740E671D1334E7984E1860769 /* Pods-StylableSwiftUI_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F723C8194BB296B289FFA791D3BCF72D /* Pods-StylableSwiftUI_Example-dummy.m */; }; - 840684F95FFA8EC3852803F0598B253D /* Marker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01CD37B6472CDACDED98726DB0499BA8 /* Marker.swift */; }; - 8614204A7D4A6498DEB0A9EE64C01E25 /* CALayer+fillBounds.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83988A8E04DCE4F689E703DD473D1FBB /* CALayer+fillBounds.swift */; }; - 8656CFE42D704716F048A762CBEC5189 /* Data+Compression.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4288F0FAB59A7FFC07BF8A9128032A6 /* Data+Compression.swift */; }; - 86C74D352D37F3AFD2D88AAF50A3CC4B /* ShapeCompositionLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58A78D2A7D771497AE0A2F4326FA55F2 /* ShapeCompositionLayer.swift */; }; - 8711C977E08F368C943541506747AA7A /* TransformAnimations.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB0ED10C540F0D243A7FB15C4FB737FA /* TransformAnimations.swift */; }; - 873BFE8BADAB75F139E9D3A592F514F8 /* ValueProviderStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 382764C703625158642D5B5DD9B301E8 /* ValueProviderStore.swift */; }; - 874CB6A69C8794A2536C2915185E8723 /* Vectors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74B5D62FA2057581C4A52E7242AB179A /* Vectors.swift */; }; - 87E0263E1159DEF3691D87141AA6D6E8 /* DashPattern.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D90B227BECBBBB747E7C44DEFE6B459 /* DashPattern.swift */; }; - 8A2389AD6F30813F23A59E5E64F62729 /* AnimationTextProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C9C2C391D817498C92F2D076411BE85 /* AnimationTextProvider.swift */; }; - 8AFA678DF7D7102C2ED50C27D3F9D7D0 /* ImageLayerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 814F06F388F67D797E9760EBF71409C8 /* ImageLayerModel.swift */; }; - 8D00350D9735374F8C0A631A2103E2B5 /* AnimationKeypathExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B0B6DF879416BE682F7947873E61E6B /* AnimationKeypathExtension.swift */; }; - 8D8774EDA5EA7C448FC689CB3A399119 /* FilepathImageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEBA48D49EF511FEB1C4FB87AE7BE76C /* FilepathImageProvider.swift */; }; - 8DE22B4421D4A5C3998099286E3D199E /* CALayer+addAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B6069E75F3B792ACD1466BEACC687 /* CALayer+addAnimation.swift */; }; - 8E3D520C78F4412C1594505C98CFD0C5 /* ShapeTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FE45B5AE49E995CAA4CF30E8C6A4F13 /* ShapeTransform.swift */; }; - 8EB6C9CA30077FB24AE5FED86A3A31FE /* SolidLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03B43F035DBC52E85599E55F12D2DE9D /* SolidLayer.swift */; }; - 8FFA39383D878AF4472577EF44C25FDE /* TestHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15BC4C7FC845A035490CBAE3DC5E84E4 /* TestHelpers.swift */; }; - 9076AA15B82309E4608FDF1929DA5353 /* DotLottieCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 311704F5DE9E45691BA3263E709ABC72 /* DotLottieCache.swift */; }; - 94114F5B974267BDF7076195A490B967 /* RootAnimationLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 286BD6122BE613BFD06713144EAA80BF /* RootAnimationLayer.swift */; }; - 95AC7563BA942A1CE56FCD8C883B7AE2 /* Merge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 486F96513F2076920E54951396C0814C /* Merge.swift */; }; - 9642DA659160713E3513C181333BA0B7 /* KeyframeInterpolator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49D83A5FA1B1BCB3BC4579C0C56922DB /* KeyframeInterpolator.swift */; }; - 9949689A478FCA47BAA34BBC38AC4474 /* CompositionLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87B57FCC02C73C8DC5597A330E42FB74 /* CompositionLayer.swift */; }; - 9964DDADF0D385659C4F22A296D6BF45 /* FillNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8081B23007DC9C86C8BC003A290A21F0 /* FillNode.swift */; }; - 99902AF25053BA8B6968D7E849384B0C /* URL+ZIP.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6BDB3FFBA0A5323E9D4C2EFEB08CC3E /* URL+ZIP.swift */; }; - 99F4EF37E1BC5796C68137544C0ED64B /* Mask.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0137717EFF398E73CBBCC466DEFE0FD /* Mask.swift */; }; - 9A4C7433D93EC6D44BE371E551E7BDAD /* LottieAnimationHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1AFFCB4ED94E53358CEB9F6337985D0 /* LottieAnimationHelpers.swift */; }; - 9B7B3497788D9A92581876D75ECE1DA3 /* StringExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F75CF52500CC95A7E587D33A583C61EC /* StringExtensions.swift */; }; - 9B9E7C20A8E8BEA8298256BCBBDF6072 /* AnimationTime.swift in Sources */ = {isa = PBXBuildFile; fileRef = C60EA2DCBF36F2EA3F8C48A8D7B7085C /* AnimationTime.swift */; }; - 9CCEA3D2115AA5C83B0555760B654505 /* StylistIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 912C1AE464CA327CFF3C0E0C335D6F78 /* StylistIdentifier.swift */; }; - 9D5F25BB77943AC1C0A9C637C3B3EAE1 /* Stylist+UIKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = F22EC137D59B5D74B4F896B51AF5ADD4 /* Stylist+UIKit.swift */; }; - 9E8A543201F024278789076AC82B4F73 /* LottieConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F2F48CE8F4C53DF90DBA7D045A10FEF /* LottieConfiguration.swift */; }; - A04AD6444D7D86346E6231A5C584E884 /* AnimatorNodeDebugging.swift in Sources */ = {isa = PBXBuildFile; fileRef = 219F3E5B8DC36E56485248D8EE2350E6 /* AnimatorNodeDebugging.swift */; }; - A10A2A4F77FB31C08F330AFAA014E389 /* DictionaryInitializable.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC1602C29B40B6F673AC49470C419EE0 /* DictionaryInitializable.swift */; }; - A1D5E5118986623A6A6483DBF56C6C96 /* Archive+ZIP64.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DE61A43627A1743FD0428388283C1D6 /* Archive+ZIP64.swift */; }; - A21B35A8A317F1B7FF609A994AE180F9 /* StarAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5413CEF6AC8676FD3F274D82F8C6F09C /* StarAnimation.swift */; }; - A38EE6023416B398B654465FF7B86963 /* Archive+MemoryFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C96DEBFCF9769E765C9F2B0EE48A6D79 /* Archive+MemoryFile.swift */; }; - A57AB82BA3A0E5EE8D90ED92D9DDB785 /* StylistIdentifierMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95D59CBA3554FE446027423331794FB6 /* StylistIdentifierMatcher.swift */; }; - A97341A6F9B8E9C34B21769E54A71439 /* OpacityAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AFC26D2CD8DAB417851EA85A40CC552 /* OpacityAnimation.swift */; }; - AB324DED8AD1A8C54026CF17787EBCF9 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 840FA0B75AF62912A30DDC66B647ED98 /* CoreGraphics.framework */; }; - B16B052B91275A01A909B0A6AFE1B9A6 /* AnimationImageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFC743A856BE35274944E60AFA0F58BC /* AnimationImageProvider.swift */; }; - B1832097BA1983FF1F9E2DCED898A634 /* ItemsExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = C99F5F690B21C8E5E31894EC49B5C03E /* ItemsExtension.swift */; }; - B27184DC7A405A45E24AFC80737AFF67 /* TextCompositionLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5EC4CB4F0C18CE61145F6ADEA682DAA9 /* TextCompositionLayer.swift */; }; - B279C3295A3607E744EE1F2EE68A3A68 /* VectorsExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = A351988FDCCE733781B021A0FDCB3483 /* VectorsExtensions.swift */; }; - B2D44E48C25D4B340B970422BBDDA99D /* Rectangle.swift in Sources */ = {isa = PBXBuildFile; fileRef = E59C775D88C896B5883F2C57DE7AE6E4 /* Rectangle.swift */; }; - B3A059325006971712DD4D8488A5CAAA /* AnimatedControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64A131420EEC9DBF8FE156EF442B66A5 /* AnimatedControl.swift */; }; - B5648CF2FB87777347161ED865396EAA /* LayerProperty.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE54C77D2362DD6A792578761D2E6A5A /* LayerProperty.swift */; }; - B61720A8FF4C09FFE7E359CBE9C5ADFC /* Bundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE6F58B7BBD868A401EB937A2A3451CA /* Bundle.swift */; }; - B6EBB0027EB831C54D72D9BCBFF1D0F9 /* GradientFillRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC302F992F103F2A60DAEC0D6D53A35B /* GradientFillRenderer.swift */; }; - B76BCCC746BB175B847D8036C21E5DE7 /* Archive+BackingConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 174E77D896BF5E9E1BD93A02D5E13801 /* Archive+BackingConfiguration.swift */; }; - B7F0B48511A69BC230586A3247FCA836 /* PreCompLayerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0B6EB877EB3E9E31E0E35878A5FC8E8 /* PreCompLayerModel.swift */; }; - B90BD1E00D6438D2897D4D3B5898C0C8 /* VisibilityAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F079C5CA74C91008C11ACFA06B3FD539 /* VisibilityAnimation.swift */; }; - BA4111806DE27D4453C847540D86F467 /* CustomPathAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AABF2EB694F8949FD54BF0130B1FC18 /* CustomPathAnimation.swift */; }; - BAC62B9182624B830A3AD4E46AC0ED3A /* Stylist.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EE099272C2C6107FAAC1DE0299B0794 /* Stylist.swift */; }; - BB9CA08FAD488B95826B87AB83F26691 /* ImageLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D0863E693FECE5E07CDD16DFFD26ACC /* ImageLayer.swift */; }; - BC0EA9F64C93C4074B3244891C743676 /* ValueContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C35E35238B7F727FFFABE3E6091599 /* ValueContainer.swift */; }; - BC3CC1712141A58F272D0AE540596A88 /* GradientValueProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69807F540F6E4AEDA1B5276F46A9E54F /* GradientValueProvider.swift */; }; - BCD281910F76A2C53503FAC5CBAB2FC0 /* StrokeNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A39AFA7DB17FFF4DD41FF70451758 /* StrokeNode.swift */; }; - BD290E2F581402F89EA7D97F860992F1 /* Keyframes+combined.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E096908229D8038AAC6C95CDC5DFE17 /* Keyframes+combined.swift */; }; - BD52AF429A51E907A9AEE6122AB28471 /* Data+CompressionDeprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1BCCB85EA80D9653E7190EE63E5673B2 /* Data+CompressionDeprecated.swift */; }; - BE429CF6CF0BBC223EB593C6645DC76A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79CF7D56C5D50C18B2EA0ED106D998C7 /* Foundation.framework */; }; - C0003FBEF8A40420AF360F88A02E5D91 /* AnimationKeypath.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA1768BE0972032AFADC0492F7638A19 /* AnimationKeypath.swift */; }; - C0237F8B8862B6DC3D70E0A9DEFE756A /* ShapeContainerLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC867A84365C0990DDAA7C9A8053B96C /* ShapeContainerLayer.swift */; }; - C05CA409345C737BAF34E834D56E80F0 /* Stroke.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B29E5E277D7CAFEBDCC8669B87C68EE /* Stroke.swift */; }; - C08C9E0B445FBF78E8FB44F25AC13D60 /* TrimPathNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = A01183CA20B3B4BCE3C32F072E59736B /* TrimPathNode.swift */; }; - C12518EE64CCC5D4AC726296E6D34D4B /* ShapeItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B4607D7E1EF6FEB680B2DC751170E6C /* ShapeItem.swift */; }; - C1889B8FED88E4231AA9E11F081C1106 /* TextAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63450EFD96965F1DB79FFC32813CCB36 /* TextAnimator.swift */; }; - C1BF9C2332497D62B0F497C63158E17C /* GradientFill.swift in Sources */ = {isa = PBXBuildFile; fileRef = 737880B0E1E7092B11793572FFBCCCAF /* GradientFill.swift */; }; - C22C0BFABF078F24ECC75386AF24D93E /* BezierPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13BC22AD4B48B4F7AA7308AF9DFA4280 /* BezierPath.swift */; }; - C4E12530FB0BA764E8FCD61491BD846D /* GroupInterpolator.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0F19BF2D2649E4086CA20DE7D77F160 /* GroupInterpolator.swift */; }; - C59FDC72D2A7E3B7CE843A9A8791D806 /* Pods-StylableSwiftUI_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = DFACA3F314B71639262F45835CBBB15D /* Pods-StylableSwiftUI_Tests-dummy.m */; }; - C5DA44D2AD47D4FA4511B7B1AF7AED88 /* NullCompositionLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EE3C927B618D95277B31D32CD91CCF8 /* NullCompositionLayer.swift */; }; - C68D277F2BA6FF79BB5B08BCDFCE37CE /* Archive+Progress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55561C0899B02D83688E7FAA051F1B3B /* Archive+Progress.swift */; }; - C82D294B82E15322EF3B72FC4DC0D0E8 /* SolidCompositionLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 096AC4A863FA4A3B0CC608F3480F17C7 /* SolidCompositionLayer.swift */; }; - C98948D2CC01DB1FEC3A7753267641BA /* UnitBezier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99E7381DB38D3BE8FE63B5BD9066E109 /* UnitBezier.swift */; }; - C9BD5304752EDDC6A19F0969E73EBDDA /* Pods-StylableSwiftUI_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F4406E2FFB9C406785A39372ACA45C9 /* Pods-StylableSwiftUI_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CA0C10DE94AFA993699C4236AB07E680 /* AnimationCacheProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E98E8A19AE5C1E5E31EC911B6E6D86A /* AnimationCacheProvider.swift */; }; - CBC041697CBBEE35DC71A7A8B9916ECC /* NodePropertyMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFDA08DDDF2BC1523A23523B79BAAAF4 /* NodePropertyMap.swift */; }; - CF97E6A52B2DADAF6066C0B7A038CD79 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A42DBD2F42D55606EEBA514009498B87 /* QuartzCore.framework */; }; - D0B8B5AFA87BDF7767116FB5C5A31768 /* Font.swift in Sources */ = {isa = PBXBuildFile; fileRef = 751203E731CBCA290BB284D4C5AA4B70 /* Font.swift */; }; - D307C5AA3E196A7F0D831C202FFFC80F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79CF7D56C5D50C18B2EA0ED106D998C7 /* Foundation.framework */; }; - D387B1C2B353118D1FF2EDA0F9A077AF /* TextLayerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFBAF28B6D5E045AD5C92F73A7B959CA /* TextLayerModel.swift */; }; - D3B5D4EAB569869A3AF43FBC4E899C2C /* KeyframeGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3580C7CA4BD67158B48E492FC300CAFE /* KeyframeGroup.swift */; }; - D4F91E4AAEEAFBC8D6A48316247E13DB /* CompositionLayersInitializer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F886090B48EBB6EFF58BEF4F423F780 /* CompositionLayersInitializer.swift */; }; - D55419E97EAB8AFE4651C03253922D1A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79CF7D56C5D50C18B2EA0ED106D998C7 /* Foundation.framework */; }; - D58ABDABE1F203F4FB0C57496AFE6FD3 /* CompatibilityTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B5A8E01E6C7B836039FAB45DA75D05 /* CompatibilityTracker.swift */; }; - D628D3072FF4E070A1FDB299C245CC08 /* View+style.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98A86C648EFE4CF6C08CAC25CCCA1DF0 /* View+style.swift */; }; - D7E0AF52F27E41030DD77AAD270C0A84 /* lottie-ios-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = DB59410BD4B33BFA0D84778BD00D3306 /* lottie-ios-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D947A926D254D8B4AB211B05EE62C1BE /* StrokeAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D49C447EE7DE246F02E4B82FCE7CC3F /* StrokeAnimation.swift */; }; - DA44B1581DADFEF0012A20B3013D45F4 /* CompoundBezierPath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30EF988690CE4441AF4F38731D087301 /* CompoundBezierPath.swift */; }; - DB386459ED71A5E888933DF75EB8148F /* Keyframe.swift in Sources */ = {isa = PBXBuildFile; fileRef = B82B68B4F21AB7FF0BB1CE9F0227A797 /* Keyframe.swift */; }; - DBC634DFA9E992FDB99FF326987D03A9 /* DotLottieFileHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5E1C3F545FCA8AB4CACE16DD87EC8BB /* DotLottieFileHelpers.swift */; }; - DC5221CB3DDCAC953149CA50B6D10AB0 /* DotLottieFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57728E1D5FA3A74AD26544313F03BF14 /* DotLottieFile.swift */; }; - DD43651BEE467BED6AA7011AB09C2D78 /* DotLottieUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F922F0E282E5B804D581957046BA74D /* DotLottieUtils.swift */; }; - DFF482F708315605FC9B0C6439A5226D /* SingleValueProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 847AA8DD8160B3BF21DF95062BFA2131 /* SingleValueProvider.swift */; }; - E1D7A115FDD929774F75DFAEBD29E6FB /* RoundedCornersNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52E21FD9EEC4EE82821C74D328734EBE /* RoundedCornersNode.swift */; }; - E42CFC6E2B440CA4A5C4D82A69B1D777 /* CAAnimation+TimingConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA3865DFBFA39F028786FB8E27CA0FDB /* CAAnimation+TimingConfiguration.swift */; }; - E4721018025B8F6B83CF7242FA72B99A /* PathNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A264712D5620CE877230F7D52D85DD1 /* PathNode.swift */; }; - E4C0ED615790D52086D805D92D65D578 /* MaskCompositionLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E59DD9B01EEE0A4F9E13DBBA787E26A /* MaskCompositionLayer.swift */; }; - E4FDBA4308929CE1E6CFA9E6F11BD3CA /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = DFA0310269DAB4D83FBDB53A5DBFBF7C /* README.md */; }; - E65754020085C5B72D9D37A866B916F9 /* CompatibleAnimationKeypath.swift in Sources */ = {isa = PBXBuildFile; fileRef = A07A4FE15A65A4CA7EC058B0C4A3C49C /* CompatibleAnimationKeypath.swift */; }; - E6AFE4E1B6086E598524B4D6491AA41D /* ImageCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37749CBEC7056AA3EB2E3EC3955659C0 /* ImageCache.swift */; }; - E858157E7C8756C41F490EAFE12EAE28 /* StylableImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 164365CE2D6A182520BB4E67D41D1E45 /* StylableImage.swift */; }; - EA3AEBE6FAA281C6D78D0E6F00C119D6 /* MainThreadAnimationLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = C96212AFFFAA9CD4765F3F8ADE72C751 /* MainThreadAnimationLayer.swift */; }; - EA7AB36D6A2889486A1D2EE80F792A89 /* GradientStrokeNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF2814C1D35F58837DA0DACB3B4CD05B /* GradientStrokeNode.swift */; }; - EE589ED85B8808B0830912ED2EBEA467 /* GroupOutputNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BEA83C23BEB40FD5F6F2B297337E437 /* GroupOutputNode.swift */; }; - EEE1586E3824C8C6B698E3668BA933DF /* Archive+Reading.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B6AC46F91806B292B0C5BEDD4609189 /* Archive+Reading.swift */; }; - F2C1246CFDA1B125AA636166E49D083F /* Pods-StylableSwiftUI_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D1DD3D846172B29A86C7B9A95EF86EE7 /* Pods-StylableSwiftUI_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F2F035BA9321DFF9370E0136CC21E319 /* LayerFontProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C41A3000297B704EB9FDA924E4FA328 /* LayerFontProvider.swift */; }; - F3E04C2461609E4BE1D03332EE4A3974 /* Group.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC49DF6C51F55C3512E5500179C5BAE8 /* Group.swift */; }; - F3F9500BB4AB03D5B7A728EA40B0866B /* GradientStroke.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5D0760C8AE6581BB0D401726801BD5D /* GradientStroke.swift */; }; - F5E397625A03E580140AE227445B7EDF /* ShapeLayerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49A7EF574EB900FE8CEED3971EDD2E06 /* ShapeLayerModel.swift */; }; - F747D836E468BB981DD6BE19C70810B2 /* Archive.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A57450AB14D15A2E8414FE06874B03D /* Archive.swift */; }; - F8FB7AF7E8654F1F80DD92E2840E1245 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 394DAF43496431CA4F4B997D0BE6F332 /* Logger.swift */; }; - FC1892FCE15696BB46D9D2690519A864 /* ShapeAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22E35A1B3B8B4E406F876A3D17F350B2 /* ShapeAnimation.swift */; }; - FD4218583F31BB489276BD338711CDEA /* DataExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4E019F5247F636D8BD4E0567EAE681D /* DataExtension.swift */; }; - FF816B55340408B32032B6DBAFE3031E /* DebugStylist.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6566E00AA11CEB5E635142DD4337852E /* DebugStylist.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 06A78FC91786C0D3471F25CBDEC40B77 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 0B967D7F8561D42493EE289EC8D450D1; - remoteInfo = "lottie-ios"; - }; - A0235DBC95A4BDD93847B87096984A60 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 0E12E449EA31D5414AB180DDBF51184C; - remoteInfo = StylableSwiftUI; - }; - C35675B6BB369620F8CD505FE7AC22BD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 4E0384231A8EAAB431B4C45C84245A95; - remoteInfo = "Pods-StylableSwiftUI_Example"; - }; - D56D7259A36CE0C602555E3E9EC41900 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 52B60EC2A583F24ACBB69C113F5488B9; - remoteInfo = SwiftLint; - }; - E1B536702B9778EDE2C57A05D7C5B1AB /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 0B967D7F8561D42493EE289EC8D450D1; - remoteInfo = "lottie-ios"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 01CD37B6472CDACDED98726DB0499BA8 /* Marker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Marker.swift; path = Sources/Private/Model/Objects/Marker.swift; sourceTree = ""; }; - 025931CA8280187F6188A307483A072B /* LayerImageProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayerImageProvider.swift; path = Sources/Private/MainThread/LayerContainers/Utility/LayerImageProvider.swift; sourceTree = ""; }; - 03B43F035DBC52E85599E55F12D2DE9D /* SolidLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SolidLayer.swift; path = Sources/Private/CoreAnimation/Layers/SolidLayer.swift; sourceTree = ""; }; - 0480EC1AD0B8EFC715A9B68E9EAD06C0 /* StylableSwiftUI-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "StylableSwiftUI-prefix.pch"; sourceTree = ""; }; - 04B5A8E01E6C7B836039FAB45DA75D05 /* CompatibilityTracker.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompatibilityTracker.swift; path = Sources/Private/CoreAnimation/CompatibilityTracker.swift; sourceTree = ""; }; - 04D60AC13D33197690A05C641925DDDA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; - 096AC4A863FA4A3B0CC608F3480F17C7 /* SolidCompositionLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SolidCompositionLayer.swift; path = Sources/Private/MainThread/LayerContainers/CompLayers/SolidCompositionLayer.swift; sourceTree = ""; }; - 0A57450AB14D15A2E8414FE06874B03D /* Archive.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Archive.swift; path = Sources/Private/Model/DotLottie/ZipFoundation/Archive.swift; sourceTree = ""; }; - 0B0B6DF879416BE682F7947873E61E6B /* AnimationKeypathExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimationKeypathExtension.swift; path = Sources/Private/Utility/Extensions/AnimationKeypathExtension.swift; sourceTree = ""; }; - 0B82A4892A64301368F000C6EE5A539E /* Pods-StylableSwiftUI_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-StylableSwiftUI_Tests-acknowledgements.plist"; sourceTree = ""; }; - 0D933AB707E8940C3512A2FA69316DB6 /* StylableSwiftUI.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = StylableSwiftUI.debug.xcconfig; sourceTree = ""; }; - 0E24C849FAE0005C0F71C2956A650E94 /* KeyframeGroup+exactlyOneKeyframe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "KeyframeGroup+exactlyOneKeyframe.swift"; path = "Sources/Private/CoreAnimation/Extensions/KeyframeGroup+exactlyOneKeyframe.swift"; sourceTree = ""; }; - 0FC22E98B82B7503366D2097E29513C7 /* LottieAnimationViewInitializers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LottieAnimationViewInitializers.swift; path = Sources/Public/Animation/LottieAnimationViewInitializers.swift; sourceTree = ""; }; - 11BBA994A987D4E0260FAEE537AD935C /* Theme.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Theme.swift; path = StylableSwiftUI/Classes/Core/Theme.swift; sourceTree = ""; }; - 1253B1031382929A684699D3207EE5E4 /* DotLottieCacheProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DotLottieCacheProvider.swift; path = Sources/Public/DotLottie/Cache/DotLottieCacheProvider.swift; sourceTree = ""; }; - 13BC22AD4B48B4F7AA7308AF9DFA4280 /* BezierPath.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BezierPath.swift; path = Sources/Private/Utility/Primitives/BezierPath.swift; sourceTree = ""; }; - 13D8A40C94913A926E6DFCDD3B69E11E /* StylableSwiftUI-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "StylableSwiftUI-dummy.m"; sourceTree = ""; }; - 15BC4C7FC845A035490CBAE3DC5E84E4 /* TestHelpers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TestHelpers.swift; path = Sources/Private/Utility/Debugging/TestHelpers.swift; sourceTree = ""; }; - 1602402F8CAEE21DE695BA04ACF165A8 /* LottieAnimationCache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LottieAnimationCache.swift; path = Sources/Public/AnimationCache/LottieAnimationCache.swift; sourceTree = ""; }; - 164365CE2D6A182520BB4E67D41D1E45 /* StylableImage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StylableImage.swift; path = StylableSwiftUI/Classes/Core/StylableImage.swift; sourceTree = ""; }; - 1666870D14986900E7DC82776360150B /* StylableSwiftUI-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "StylableSwiftUI-Info.plist"; sourceTree = ""; }; - 174E77D896BF5E9E1BD93A02D5E13801 /* Archive+BackingConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Archive+BackingConfiguration.swift"; path = "Sources/Private/Model/DotLottie/ZipFoundation/Archive+BackingConfiguration.swift"; sourceTree = ""; }; - 190559FCF8041CCD9284DBA67BFF77A9 /* AnimationSubview.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimationSubview.swift; path = Sources/Public/iOS/AnimationSubview.swift; sourceTree = ""; }; - 1911DCEB23CB37CA72A6F8E78379F159 /* KeyframeExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KeyframeExtensions.swift; path = Sources/Private/Utility/Interpolatable/KeyframeExtensions.swift; sourceTree = ""; }; - 1A2A39AFA7DB17FFF4DD41FF70451758 /* StrokeNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StrokeNode.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/StrokeNode.swift; sourceTree = ""; }; - 1B9AFEAC4B3361B5BCC1A7E4C9D84E49 /* Entry.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Entry.swift; path = Sources/Private/Model/DotLottie/ZipFoundation/Entry.swift; sourceTree = ""; }; - 1BCCB85EA80D9653E7190EE63E5673B2 /* Data+CompressionDeprecated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data+CompressionDeprecated.swift"; path = "Sources/Private/Model/DotLottie/ZipFoundation/Data+CompressionDeprecated.swift"; sourceTree = ""; }; - 1C9C2C391D817498C92F2D076411BE85 /* AnimationTextProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimationTextProvider.swift; path = Sources/Public/TextProvider/AnimationTextProvider.swift; sourceTree = ""; }; - 1D3116184EBD150817DD4FC95D111A5C /* CGColor+RGB.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CGColor+RGB.swift"; path = "Sources/Private/Utility/Extensions/CGColor+RGB.swift"; sourceTree = ""; }; - 1E192307550D7B254984A9E9A13251F0 /* Pods-StylableSwiftUI_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-StylableSwiftUI_Tests.modulemap"; sourceTree = ""; }; - 1F453944467880597DD001CBF6AF6CF9 /* Entry+ZIP64.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Entry+ZIP64.swift"; path = "Sources/Private/Model/DotLottie/ZipFoundation/Entry+ZIP64.swift"; sourceTree = ""; }; - 1F886090B48EBB6EFF58BEF4F423F780 /* CompositionLayersInitializer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompositionLayersInitializer.swift; path = Sources/Private/MainThread/LayerContainers/Utility/CompositionLayersInitializer.swift; sourceTree = ""; }; - 21202759E0FA0092041253D3012D6E33 /* InvertedMatteLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvertedMatteLayer.swift; path = Sources/Private/MainThread/LayerContainers/Utility/InvertedMatteLayer.swift; sourceTree = ""; }; - 219F3E5B8DC36E56485248D8EE2350E6 /* AnimatorNodeDebugging.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimatorNodeDebugging.swift; path = Sources/Private/Utility/Debugging/AnimatorNodeDebugging.swift; sourceTree = ""; }; - 22B282ECA91D04DC2A3C365CD20C2FC6 /* LottieLogger.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LottieLogger.swift; path = Sources/Public/Logging/LottieLogger.swift; sourceTree = ""; }; - 22E35A1B3B8B4E406F876A3D17F350B2 /* ShapeAnimation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShapeAnimation.swift; path = Sources/Private/CoreAnimation/Animations/ShapeAnimation.swift; sourceTree = ""; }; - 25CE74F193121F6D4A2AD188E582A752 /* WithStyleIdentifier.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WithStyleIdentifier.swift; path = StylableSwiftUI/Classes/Core/WithStyleIdentifier.swift; sourceTree = ""; }; - 27A4C6C08A4C12ADEE60E0656C735428 /* LottieColor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LottieColor.swift; path = Sources/Public/Primitives/LottieColor.swift; sourceTree = ""; }; - 280579E6328833F20052AA3E19A52C98 /* DotLottieConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DotLottieConfiguration.swift; path = Sources/Private/Model/DotLottie/DotLottieConfiguration.swift; sourceTree = ""; }; - 286BD6122BE613BFD06713144EAA80BF /* RootAnimationLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RootAnimationLayer.swift; path = Sources/Private/RootAnimationLayer.swift; sourceTree = ""; }; - 28F4A3F5E81F7333E50CA0EC76A6DF98 /* Asset.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Asset.swift; path = Sources/Private/Model/Assets/Asset.swift; sourceTree = ""; }; - 2956630ECEDACC0F465F674259E62A06 /* BezierPathRoundExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BezierPathRoundExtension.swift; path = Sources/Private/Utility/Primitives/BezierPathRoundExtension.swift; sourceTree = ""; }; - 2BEA83C23BEB40FD5F6F2B297337E437 /* GroupOutputNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupOutputNode.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/GroupOutputNode.swift; sourceTree = ""; }; - 2E3034F755162A44193D114320F95627 /* Pods-StylableSwiftUI_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-StylableSwiftUI_Example.release.xcconfig"; sourceTree = ""; }; - 303EAB1A6C8E2F016E13802007730066 /* ThemedStylistIdentifier.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThemedStylistIdentifier.swift; path = StylableSwiftUI/Classes/Core/ThemedStylistIdentifier.swift; sourceTree = ""; }; - 30AFE4E822B18CEC1E51FF698D5012BF /* Pods-StylableSwiftUI_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-StylableSwiftUI_Example.debug.xcconfig"; sourceTree = ""; }; - 30EF988690CE4441AF4F38731D087301 /* CompoundBezierPath.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompoundBezierPath.swift; path = Sources/Private/Utility/Primitives/CompoundBezierPath.swift; sourceTree = ""; }; - 30F26CFA7FD328979FB7546B9C6C44CA /* PreCompositionLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PreCompositionLayer.swift; path = Sources/Private/MainThread/LayerContainers/CompLayers/PreCompositionLayer.swift; sourceTree = ""; }; - 311704F5DE9E45691BA3263E709ABC72 /* DotLottieCache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DotLottieCache.swift; path = Sources/Public/DotLottie/Cache/DotLottieCache.swift; sourceTree = ""; }; - 31791B2E1B89F1553A5EBB031FEE0CFA /* FloatValueProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FloatValueProvider.swift; path = Sources/Public/DynamicProperties/ValueProviders/FloatValueProvider.swift; sourceTree = ""; }; - 3580C7CA4BD67158B48E492FC300CAFE /* KeyframeGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KeyframeGroup.swift; path = Sources/Private/Model/Keyframes/KeyframeGroup.swift; sourceTree = ""; }; - 37749CBEC7056AA3EB2E3EC3955659C0 /* ImageCache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ImageCache.swift; sourceTree = ""; }; - 37CD009FE68D83B338431A5D54EBD837 /* RectangleAnimation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RectangleAnimation.swift; path = Sources/Private/CoreAnimation/Animations/RectangleAnimation.swift; sourceTree = ""; }; - 382764C703625158642D5B5DD9B301E8 /* ValueProviderStore.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ValueProviderStore.swift; path = Sources/Private/CoreAnimation/ValueProviderStore.swift; sourceTree = ""; }; - 394DAF43496431CA4F4B997D0BE6F332 /* Logger.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Logger.swift; path = StylableSwiftUI/Classes/Core/Logger.swift; sourceTree = ""; }; - 3A6336F632C2FC71A4F67E3DD6F7032A /* CoreTextRenderLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CoreTextRenderLayer.swift; path = Sources/Private/MainThread/LayerContainers/Utility/CoreTextRenderLayer.swift; sourceTree = ""; }; - 3CFCBACA305525B5FD0767C4AFF31E40 /* lottie-ios-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "lottie-ios-dummy.m"; sourceTree = ""; }; - 3D90B227BECBBBB747E7C44DEFE6B459 /* DashPattern.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DashPattern.swift; path = Sources/Private/Model/Objects/DashPattern.swift; sourceTree = ""; }; - 3DE61A43627A1743FD0428388283C1D6 /* Archive+ZIP64.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Archive+ZIP64.swift"; path = "Sources/Private/Model/DotLottie/ZipFoundation/Archive+ZIP64.swift"; sourceTree = ""; }; - 3E096908229D8038AAC6C95CDC5DFE17 /* Keyframes+combined.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Keyframes+combined.swift"; path = "Sources/Private/CoreAnimation/Extensions/Keyframes+combined.swift"; sourceTree = ""; }; - 4061C485992396262E9EEBED2962BB7C /* ColorExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ColorExtension.swift; path = Sources/Private/Utility/Primitives/ColorExtension.swift; sourceTree = ""; }; - 410F6554B7D5CD374986DF597E1CB849 /* CGFloatExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CGFloatExtensions.swift; path = Sources/Private/Utility/Extensions/CGFloatExtensions.swift; sourceTree = ""; }; - 427C2A4415D436636E0222B1D1F2FAB7 /* AnimationContext.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimationContext.swift; path = Sources/Private/Utility/Helpers/AnimationContext.swift; sourceTree = ""; }; - 438F330404FBC73C2428A5F827736977 /* PrecompAsset.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PrecompAsset.swift; path = Sources/Private/Model/Assets/PrecompAsset.swift; sourceTree = ""; }; - 45184BDE668BD817DFAF090B3E7F7F22 /* LayerTextProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayerTextProvider.swift; path = Sources/Private/MainThread/LayerContainers/Utility/LayerTextProvider.swift; sourceTree = ""; }; - 4805880B15F5B22FDEE4FCD3D1F64E69 /* EllipseNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EllipseNode.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/EllipseNode.swift; sourceTree = ""; }; - 486F96513F2076920E54951396C0814C /* Merge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Merge.swift; path = Sources/Private/Model/ShapeItems/Merge.swift; sourceTree = ""; }; - 49A7EF574EB900FE8CEED3971EDD2E06 /* ShapeLayerModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShapeLayerModel.swift; path = Sources/Private/Model/Layers/ShapeLayerModel.swift; sourceTree = ""; }; - 49D83A5FA1B1BCB3BC4579C0C56922DB /* KeyframeInterpolator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KeyframeInterpolator.swift; path = Sources/Private/Utility/Interpolatable/KeyframeInterpolator.swift; sourceTree = ""; }; - 4A36AA71A56A88293C9341811F490663 /* GradientRenderLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GradientRenderLayer.swift; path = Sources/Private/CoreAnimation/Layers/GradientRenderLayer.swift; sourceTree = ""; }; - 4B29E5E277D7CAFEBDCC8669B87C68EE /* Stroke.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stroke.swift; path = Sources/Private/Model/ShapeItems/Stroke.swift; sourceTree = ""; }; - 4B9C3B8641E38BF0043867A788B3C3BD /* RenderNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RenderNode.swift; path = Sources/Private/MainThread/NodeRenderSystem/Protocols/RenderNode.swift; sourceTree = ""; }; - 4BE4AFFD13D1E96322CBE259DFE4E8C3 /* Pods-StylableSwiftUI_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-StylableSwiftUI_Example-frameworks.sh"; sourceTree = ""; }; - 4C2AB118BADEABE2FD0BE198C4F91DB1 /* Archive+Helpers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Archive+Helpers.swift"; path = "Sources/Private/Model/DotLottie/ZipFoundation/Archive+Helpers.swift"; sourceTree = ""; }; - 4C7171FDB662E6F5148D15E2C59AE613 /* lottie-ios.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "lottie-ios.debug.xcconfig"; sourceTree = ""; }; - 4D264895CCBA0EBE166161B519945234 /* Pods-StylableSwiftUI_Example */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-StylableSwiftUI_Example"; path = Pods_StylableSwiftUI_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 4D49C447EE7DE246F02E4B82FCE7CC3F /* StrokeAnimation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StrokeAnimation.swift; path = Sources/Private/CoreAnimation/Animations/StrokeAnimation.swift; sourceTree = ""; }; - 4E98E8A19AE5C1E5E31EC911B6E6D86A /* AnimationCacheProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimationCacheProvider.swift; path = Sources/Public/AnimationCache/AnimationCacheProvider.swift; sourceTree = ""; }; - 4ECFFFB7C1BD882046A2E8F945BA1173 /* Archive+ReadingDeprecated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Archive+ReadingDeprecated.swift"; path = "Sources/Private/Model/DotLottie/ZipFoundation/Archive+ReadingDeprecated.swift"; sourceTree = ""; }; - 4FB503F0443198EB9CF8BCEFF1FC2851 /* TextDocument.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TextDocument.swift; path = Sources/Private/Model/Text/TextDocument.swift; sourceTree = ""; }; - 50C9B48E6A456887593D058FC1A34252 /* Transform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Transform.swift; path = Sources/Private/Model/Objects/Transform.swift; sourceTree = ""; }; - 5142FAFF92184807A3E8DCE2A4F5BC4D /* SolidLayerModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SolidLayerModel.swift; path = Sources/Private/Model/Layers/SolidLayerModel.swift; sourceTree = ""; }; - 51BA97E8B5085EFFB47BC9C0B785CEA7 /* lottie-ios */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "lottie-ios"; path = Lottie.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 52E21FD9EEC4EE82821C74D328734EBE /* RoundedCornersNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RoundedCornersNode.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/RoundedCornersNode.swift; sourceTree = ""; }; - 53FE7236641CC3A043656BFC31493040 /* BundleImageProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BundleImageProvider.swift; path = Sources/Public/iOS/BundleImageProvider.swift; sourceTree = ""; }; - 5413CEF6AC8676FD3F274D82F8C6F09C /* StarAnimation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StarAnimation.swift; path = Sources/Private/CoreAnimation/Animations/StarAnimation.swift; sourceTree = ""; }; - 55561C0899B02D83688E7FAA051F1B3B /* Archive+Progress.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Archive+Progress.swift"; path = "Sources/Private/Model/DotLottie/ZipFoundation/Archive+Progress.swift"; sourceTree = ""; }; - 57728E1D5FA3A74AD26544313F03BF14 /* DotLottieFile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DotLottieFile.swift; path = Sources/Public/DotLottie/DotLottieFile.swift; sourceTree = ""; }; - 5773466217AC6458C99D06514DEC3658 /* LRUAnimationCache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LRUAnimationCache.swift; path = Sources/Public/AnimationCache/LRUAnimationCache.swift; sourceTree = ""; }; - 58A78D2A7D771497AE0A2F4326FA55F2 /* ShapeCompositionLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShapeCompositionLayer.swift; path = Sources/Private/MainThread/LayerContainers/CompLayers/ShapeCompositionLayer.swift; sourceTree = ""; }; - 5B99811236455523692133D709217227 /* Pods-StylableSwiftUI_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-StylableSwiftUI_Tests.debug.xcconfig"; sourceTree = ""; }; - 5BA324DEE8CC2750C646F874285C6F52 /* LayerModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayerModel.swift; path = Sources/Private/Model/Layers/LayerModel.swift; sourceTree = ""; }; - 5D0863E693FECE5E07CDD16DFFD26ACC /* ImageLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageLayer.swift; path = Sources/Private/CoreAnimation/Layers/ImageLayer.swift; sourceTree = ""; }; - 5EC4CB4F0C18CE61145F6ADEA682DAA9 /* TextCompositionLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TextCompositionLayer.swift; path = Sources/Private/MainThread/LayerContainers/CompLayers/TextCompositionLayer.swift; sourceTree = ""; }; - 5F4406E2FFB9C406785A39372ACA45C9 /* Pods-StylableSwiftUI_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-StylableSwiftUI_Tests-umbrella.h"; sourceTree = ""; }; - 61AD68895278FFE4EC86F446A30AA2D8 /* KeypathSearchable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KeypathSearchable.swift; path = Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/KeypathSearchable.swift; sourceTree = ""; }; - 61B41C52B2ECF9A5CD8A69739B3FB30D /* StylableSwiftUI.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = StylableSwiftUI.modulemap; sourceTree = ""; }; - 621C85D310F83D7028749A9ACEE3D98F /* GradientStrokeRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GradientStrokeRenderer.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientStrokeRenderer.swift; sourceTree = ""; }; - 63450EFD96965F1DB79FFC32813CCB36 /* TextAnimator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TextAnimator.swift; path = Sources/Private/Model/Text/TextAnimator.swift; sourceTree = ""; }; - 6353A0FAF5B070146EB93E6811374357 /* Pods-StylableSwiftUI_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-StylableSwiftUI_Example-acknowledgements.markdown"; sourceTree = ""; }; - 64452E5A53D7ECF74159CC822D870E91 /* PassThroughOutputNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PassThroughOutputNode.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PassThroughOutputNode.swift; sourceTree = ""; }; - 64A131420EEC9DBF8FE156EF442B66A5 /* AnimatedControl.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimatedControl.swift; path = Sources/Public/iOS/AnimatedControl.swift; sourceTree = ""; }; - 655BE3AC3BBDF289257FB5E619A99007 /* GroupNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupNode.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderContainers/GroupNode.swift; sourceTree = ""; }; - 6566E00AA11CEB5E635142DD4337852E /* DebugStylist.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DebugStylist.swift; path = StylableSwiftUI/Classes/Core/DebugStylist.swift; sourceTree = ""; }; - 66DDB7768F30960D4C02F16C0051F431 /* Archive+WritingDeprecated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Archive+WritingDeprecated.swift"; path = "Sources/Private/Model/DotLottie/ZipFoundation/Archive+WritingDeprecated.swift"; sourceTree = ""; }; - 6790AF1EA295E7FA8A4C3B569903BC55 /* GradientFillNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GradientFillNode.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientFillNode.swift; sourceTree = ""; }; - 685FA9AD07F15710B4C0162C3908B6A7 /* LottieAnimation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LottieAnimation.swift; path = Sources/Public/Animation/LottieAnimation.swift; sourceTree = ""; }; - 690576955D994308284C9490EFA17D64 /* Glyph.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Glyph.swift; path = Sources/Private/Model/Text/Glyph.swift; sourceTree = ""; }; - 69807F540F6E4AEDA1B5276F46A9E54F /* GradientValueProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GradientValueProvider.swift; path = Sources/Public/DynamicProperties/ValueProviders/GradientValueProvider.swift; sourceTree = ""; }; - 6AFC26D2CD8DAB417851EA85A40CC552 /* OpacityAnimation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OpacityAnimation.swift; path = Sources/Private/CoreAnimation/Animations/OpacityAnimation.swift; sourceTree = ""; }; - 6CCF288742A5EF8F4C0EBBB95DF964BD /* KeyframeData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KeyframeData.swift; path = Sources/Private/Model/Keyframes/KeyframeData.swift; sourceTree = ""; }; - 6EE099272C2C6107FAAC1DE0299B0794 /* Stylist.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stylist.swift; path = StylableSwiftUI/Classes/Core/Stylist.swift; sourceTree = ""; }; - 71FA9DD23C9D07F4C3C58E550F48D968 /* CoreAnimationLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CoreAnimationLayer.swift; path = Sources/Private/CoreAnimation/CoreAnimationLayer.swift; sourceTree = ""; }; - 737880B0E1E7092B11793572FFBCCCAF /* GradientFill.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GradientFill.swift; path = Sources/Private/Model/ShapeItems/GradientFill.swift; sourceTree = ""; }; - 74B5D62FA2057581C4A52E7242AB179A /* Vectors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Vectors.swift; path = Sources/Public/Primitives/Vectors.swift; sourceTree = ""; }; - 751203E731CBCA290BB284D4C5AA4B70 /* Font.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Font.swift; path = Sources/Private/Model/Text/Font.swift; sourceTree = ""; }; - 76934AC8F2F3DB2A040A6B745D452C81 /* Pods-StylableSwiftUI_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-StylableSwiftUI_Example.modulemap"; sourceTree = ""; }; - 76D1D13684378C6C7B85D9C0C5444F80 /* PathOutputNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PathOutputNode.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PathOutputNode.swift; sourceTree = ""; }; - 78CF1ED20F1995AA06DE9CB6D440C19C /* UIColorExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UIColorExtension.swift; path = Sources/Public/iOS/UIColorExtension.swift; sourceTree = ""; }; - 78F2AA43F8A96E13884C58D413820334 /* Pods-StylableSwiftUI_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-StylableSwiftUI_Tests.release.xcconfig"; sourceTree = ""; }; - 79CF7D56C5D50C18B2EA0ED106D998C7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 79D58E782A4FEB5B1AB1A248F857A452 /* ImageAsset.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageAsset.swift; path = Sources/Private/Model/Assets/ImageAsset.swift; sourceTree = ""; }; - 7A33462BE2CFD5A9EB5F99E734E43B41 /* AnimationFontProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimationFontProvider.swift; path = Sources/Public/FontProvider/AnimationFontProvider.swift; sourceTree = ""; }; - 7A777B66E6E54AB58F3AE649FC1216BA /* Ellipse.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Ellipse.swift; path = Sources/Private/Model/ShapeItems/Ellipse.swift; sourceTree = ""; }; - 7AABF2EB694F8949FD54BF0130B1FC18 /* CustomPathAnimation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CustomPathAnimation.swift; path = Sources/Private/CoreAnimation/Animations/CustomPathAnimation.swift; sourceTree = ""; }; - 7AD83FC271EBC525F28763724D3FBB64 /* TextAnimatorNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TextAnimatorNode.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/Text/TextAnimatorNode.swift; sourceTree = ""; }; - 7BADE19128CCD5CA2FF95B6628CC7057 /* LayerTransformNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayerTransformNode.swift; path = Sources/Private/MainThread/LayerContainers/Utility/LayerTransformNode.swift; sourceTree = ""; }; - 7C2209A5E70F2497ED9341B6A84E86F9 /* Star.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Star.swift; path = Sources/Private/Model/ShapeItems/Star.swift; sourceTree = ""; }; - 7D0FE6816E4D3E5029E24076602A0E35 /* CombinedShapeAnimation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CombinedShapeAnimation.swift; path = Sources/Private/CoreAnimation/Animations/CombinedShapeAnimation.swift; sourceTree = ""; }; - 7E59DD9B01EEE0A4F9E13DBBA787E26A /* MaskCompositionLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MaskCompositionLayer.swift; path = Sources/Private/CoreAnimation/Layers/MaskCompositionLayer.swift; sourceTree = ""; }; - 7EE3C927B618D95277B31D32CD91CCF8 /* NullCompositionLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NullCompositionLayer.swift; path = Sources/Private/MainThread/LayerContainers/CompLayers/NullCompositionLayer.swift; sourceTree = ""; }; - 7F2F48CE8F4C53DF90DBA7D045A10FEF /* LottieConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LottieConfiguration.swift; path = Sources/Public/LottieConfiguration.swift; sourceTree = ""; }; - 7F3B6069E75F3B792ACD1466BEACC687 /* CALayer+addAnimation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CALayer+addAnimation.swift"; path = "Sources/Private/CoreAnimation/Animations/CALayer+addAnimation.swift"; sourceTree = ""; }; - 7F74452BACAF1FB9091AB0D2E30C07DC /* SwiftLint.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftLint.release.xcconfig; sourceTree = ""; }; - 7F922F0E282E5B804D581957046BA74D /* DotLottieUtils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DotLottieUtils.swift; path = Sources/Private/Model/DotLottie/DotLottieUtils.swift; sourceTree = ""; }; - 7FE45B5AE49E995CAA4CF30E8C6A4F13 /* ShapeTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShapeTransform.swift; path = Sources/Private/Model/ShapeItems/ShapeTransform.swift; sourceTree = ""; }; - 8081B23007DC9C86C8BC003A290A21F0 /* FillNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FillNode.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/FillNode.swift; sourceTree = ""; }; - 80ED95B074263139503ED9EB09946042 /* ShapeRenderLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShapeRenderLayer.swift; path = Sources/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeRenderLayer.swift; sourceTree = ""; }; - 814F06F388F67D797E9760EBF71409C8 /* ImageLayerModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageLayerModel.swift; path = Sources/Private/Model/Layers/ImageLayerModel.swift; sourceTree = ""; }; - 816D13247E81B7566A64EE5454E2E347 /* lottie-ios-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "lottie-ios-Info.plist"; sourceTree = ""; }; - 82F18E39E30BFC2753D9AA1285A15756 /* Trim.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Trim.swift; path = Sources/Private/Model/ShapeItems/Trim.swift; sourceTree = ""; }; - 83988A8E04DCE4F689E703DD473D1FBB /* CALayer+fillBounds.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CALayer+fillBounds.swift"; path = "Sources/Private/CoreAnimation/Extensions/CALayer+fillBounds.swift"; sourceTree = ""; }; - 840FA0B75AF62912A30DDC66B647ED98 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; }; - 847AA8DD8160B3BF21DF95062BFA2131 /* SingleValueProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleValueProvider.swift; path = Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueProviders/SingleValueProvider.swift; sourceTree = ""; }; - 87B57FCC02C73C8DC5597A330E42FB74 /* CompositionLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompositionLayer.swift; path = Sources/Private/MainThread/LayerContainers/CompLayers/CompositionLayer.swift; sourceTree = ""; }; - 894D17A79761C94C924A53F563EB150E /* CGPointExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CGPointExtension.swift; path = Sources/Private/Utility/Primitives/CGPointExtension.swift; sourceTree = ""; }; - 8C10BD553FFC30327E9957405377BE85 /* RectNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RectNode.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/RectNode.swift; sourceTree = ""; }; - 8DD9BD35B7E1EF4BD59AD8203A803D0B /* MathKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MathKit.swift; path = Sources/Private/Utility/Extensions/MathKit.swift; sourceTree = ""; }; - 8DEB47F5C01CF8490BCFD30F1D70D8E8 /* FileManager+ZIP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "FileManager+ZIP.swift"; path = "Sources/Private/Model/DotLottie/ZipFoundation/FileManager+ZIP.swift"; sourceTree = ""; }; - 8E9574D70626EF1953D672B9697FEA46 /* SizeValueProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SizeValueProvider.swift; path = Sources/Public/DynamicProperties/ValueProviders/SizeValueProvider.swift; sourceTree = ""; }; - 8FC331E6497011946B78CC64FFF284B4 /* StrokeRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StrokeRenderer.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/StrokeRenderer.swift; sourceTree = ""; }; - 90F3273253250267E9C717109E851CE6 /* RepeaterLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RepeaterLayer.swift; path = Sources/Private/CoreAnimation/Layers/RepeaterLayer.swift; sourceTree = ""; }; - 912C1AE464CA327CFF3C0E0C335D6F78 /* StylistIdentifier.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StylistIdentifier.swift; path = StylableSwiftUI/Classes/Core/StylistIdentifier.swift; sourceTree = ""; }; - 92A3CE9639E1020EB4B1BFBC3BB39C76 /* DotLottieManifest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DotLottieManifest.swift; path = Sources/Private/Model/DotLottie/DotLottieManifest.swift; sourceTree = ""; }; - 92BEBF1A2DF4475C8370B1886AC9F0C1 /* EllipseAnimation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EllipseAnimation.swift; path = Sources/Private/CoreAnimation/Animations/EllipseAnimation.swift; sourceTree = ""; }; - 94DA90434E0D0EAAB0CF3526CEB83492 /* StylableSwiftUI */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = StylableSwiftUI; path = StylableSwiftUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 95C35E35238B7F727FFFABE3E6091599 /* ValueContainer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ValueContainer.swift; path = Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueContainer.swift; sourceTree = ""; }; - 95D59CBA3554FE446027423331794FB6 /* StylistIdentifierMatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StylistIdentifierMatcher.swift; path = StylableSwiftUI/Classes/Core/StylistIdentifierMatcher.swift; sourceTree = ""; }; - 96B1CC369AF58D38706D8A35EDBC98BE /* CompatibleAnimationView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompatibleAnimationView.swift; path = Sources/Public/iOS/Compatibility/CompatibleAnimationView.swift; sourceTree = ""; }; - 981F91999F107CBBB43FEECAC8A91E45 /* StylableGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StylableGroup.swift; path = StylableSwiftUI/Classes/Core/StylableGroup.swift; sourceTree = ""; }; - 98A86C648EFE4CF6C08CAC25CCCA1DF0 /* View+style.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "View+style.swift"; path = "StylableSwiftUI/Classes/Core/View+style.swift"; sourceTree = ""; }; - 99E7381DB38D3BE8FE63B5BD9066E109 /* UnitBezier.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UnitBezier.swift; path = Sources/Private/Utility/Primitives/UnitBezier.swift; sourceTree = ""; }; - 9A264712D5620CE877230F7D52D85DD1 /* PathNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PathNode.swift; path = Sources/Private/MainThread/NodeRenderSystem/Protocols/PathNode.swift; sourceTree = ""; }; - 9A3855A0E688003F387191CB7B030B75 /* PathElement.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PathElement.swift; path = Sources/Private/Utility/Primitives/PathElement.swift; sourceTree = ""; }; - 9B4607D7E1EF6FEB680B2DC751170E6C /* ShapeItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShapeItem.swift; path = Sources/Private/Model/ShapeItems/ShapeItem.swift; sourceTree = ""; }; - 9B6AC46F91806B292B0C5BEDD4609189 /* Archive+Reading.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Archive+Reading.swift"; path = "Sources/Private/Model/DotLottie/ZipFoundation/Archive+Reading.swift"; sourceTree = ""; }; - 9C41A3000297B704EB9FDA924E4FA328 /* LayerFontProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayerFontProvider.swift; path = Sources/Private/MainThread/LayerContainers/Utility/LayerFontProvider.swift; sourceTree = ""; }; - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 9DB7800CC2768F722E271D886A5986FC /* NodeProperty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NodeProperty.swift; path = Sources/Private/MainThread/NodeRenderSystem/NodeProperties/NodeProperty.swift; sourceTree = ""; }; - 9E054A240EEC6DD8B3F9E68BB1F933C8 /* InterpolatableExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InterpolatableExtensions.swift; path = Sources/Private/Utility/Interpolatable/InterpolatableExtensions.swift; sourceTree = ""; }; - A01183CA20B3B4BCE3C32F072E59736B /* TrimPathNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TrimPathNode.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/TrimPathNode.swift; sourceTree = ""; }; - A07A4FE15A65A4CA7EC058B0C4A3C49C /* CompatibleAnimationKeypath.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompatibleAnimationKeypath.swift; path = Sources/Public/iOS/Compatibility/CompatibleAnimationKeypath.swift; sourceTree = ""; }; - A08F02545DED91877ACCC02A7030DBC6 /* LottieAnimationView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LottieAnimationView.swift; path = Sources/Public/Animation/LottieAnimationView.swift; sourceTree = ""; }; - A10154A62CFA7998DBC15E95D5912D20 /* lottie-ios-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "lottie-ios-prefix.pch"; sourceTree = ""; }; - A13488FAD7826D29056795F1FC0492C9 /* lottie-ios.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "lottie-ios.modulemap"; sourceTree = ""; }; - A2AD1A2E6AACDD358DC0F2512A798033 /* Pods-StylableSwiftUI_Tests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-StylableSwiftUI_Tests-Info.plist"; sourceTree = ""; }; - A3454023F37858BA68A8CDC7DC0C5241 /* Fill.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Fill.swift; path = Sources/Private/Model/ShapeItems/Fill.swift; sourceTree = ""; }; - A351988FDCCE733781B021A0FDCB3483 /* VectorsExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VectorsExtensions.swift; path = Sources/Private/Utility/Primitives/VectorsExtensions.swift; sourceTree = ""; }; - A4288F0FAB59A7FFC07BF8A9128032A6 /* Data+Compression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data+Compression.swift"; path = "Sources/Private/Model/DotLottie/ZipFoundation/Data+Compression.swift"; sourceTree = ""; }; - A42DBD2F42D55606EEBA514009498B87 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; - A4E019F5247F636D8BD4E0567EAE681D /* DataExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DataExtension.swift; path = Sources/Private/Utility/Extensions/DataExtension.swift; sourceTree = ""; }; - A58A00F5CA69F312B32665D9FB60CA74 /* TextLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TextLayer.swift; path = Sources/Private/CoreAnimation/Layers/TextLayer.swift; sourceTree = ""; }; - A6BDB3FFBA0A5323E9D4C2EFEB08CC3E /* URL+ZIP.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URL+ZIP.swift"; path = "Sources/Private/Model/DotLottie/ZipFoundation/URL+ZIP.swift"; sourceTree = ""; }; - A6CB812610667A32952B63FFF7D1C179 /* LegacyGradientFillRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LegacyGradientFillRenderer.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/LegacyGradientFillRenderer.swift; sourceTree = ""; }; - A8B54BB8BB44B79D37E2BD7A56E354DF /* MaskContainerLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MaskContainerLayer.swift; path = Sources/Private/MainThread/LayerContainers/CompLayers/MaskContainerLayer.swift; sourceTree = ""; }; - A97076C2FD6DF803D0CE41C2E59F4758 /* StylableSwiftUI-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "StylableSwiftUI-umbrella.h"; sourceTree = ""; }; - AB0ED10C540F0D243A7FB15C4FB737FA /* TransformAnimations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TransformAnimations.swift; path = Sources/Private/CoreAnimation/Animations/TransformAnimations.swift; sourceTree = ""; }; - AB49ECB1CE9BC857C544BE182C20A526 /* Repeater.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Repeater.swift; path = Sources/Private/Model/ShapeItems/Repeater.swift; sourceTree = ""; }; - ACC2B61039887F638597C27AB420F5C5 /* AnyValueContainer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyValueContainer.swift; path = Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/AnyValueContainer.swift; sourceTree = ""; }; - AE4841F90C84ED9782C2BC3470D4DA2A /* Pods-StylableSwiftUI_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-StylableSwiftUI_Example-acknowledgements.plist"; sourceTree = ""; }; - AE7155A358A846722D6D3E525F62CE3E /* BlendMode+Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "BlendMode+Filter.swift"; path = "Sources/Private/Utility/Extensions/BlendMode+Filter.swift"; sourceTree = ""; }; - AFC743A856BE35274944E60AFA0F58BC /* AnimationImageProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimationImageProvider.swift; path = Sources/Public/ImageProvider/AnimationImageProvider.swift; sourceTree = ""; }; - AFCD7E832A05E73DD358E082FB5E700A /* AnimatedSwitch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimatedSwitch.swift; path = Sources/Public/iOS/AnimatedSwitch.swift; sourceTree = ""; }; - B197F95D0FB8F2408171B5FD7F8FB0FB /* AnimatorNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimatorNode.swift; path = Sources/Private/MainThread/NodeRenderSystem/Protocols/AnimatorNode.swift; sourceTree = ""; }; - B265AB034C62B0BFD1E9E783871705BF /* DotLottieImageProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DotLottieImageProvider.swift; path = Sources/Private/Model/DotLottie/DotLottieImageProvider.swift; sourceTree = ""; }; - B5CABB5EAB4761542524EEC781C39019 /* StylableSwiftUI.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = StylableSwiftUI.release.xcconfig; sourceTree = ""; }; - B5D0760C8AE6581BB0D401726801BD5D /* GradientStroke.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GradientStroke.swift; path = Sources/Private/Model/ShapeItems/GradientStroke.swift; sourceTree = ""; }; - B82B68B4F21AB7FF0BB1CE9F0227A797 /* Keyframe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Keyframe.swift; path = Sources/Public/Keyframes/Keyframe.swift; sourceTree = ""; }; - B8705A9991518B7B89E59F0C2170CE83 /* UIKitStyleContainer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = UIKitStyleContainer.swift; sourceTree = ""; }; - B931CB344275A89B58D4972A6F8F8C1C /* BaseAnimationLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BaseAnimationLayer.swift; path = Sources/Private/CoreAnimation/Layers/BaseAnimationLayer.swift; sourceTree = ""; }; - BB94DEAE23EA9E2FE91F0BA4CDCEB0AC /* StarNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StarNode.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/StarNode.swift; sourceTree = ""; }; - BC302F992F103F2A60DAEC0D6D53A35B /* GradientFillRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GradientFillRenderer.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientFillRenderer.swift; sourceTree = ""; }; - BDA58E6521C53473476AD7BB70F5E30A /* FillRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FillRenderer.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/FillRenderer.swift; sourceTree = ""; }; - BDBD503D10E60553838CE5E004841BD8 /* Pods-StylableSwiftUI_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-StylableSwiftUI_Tests-acknowledgements.markdown"; sourceTree = ""; }; - BEB0522A3914477D6A8A561B81ADF280 /* ImageCompositionLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageCompositionLayer.swift; path = Sources/Private/MainThread/LayerContainers/CompLayers/ImageCompositionLayer.swift; sourceTree = ""; }; - C0137717EFF398E73CBBCC466DEFE0FD /* Mask.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Mask.swift; path = Sources/Private/Model/Objects/Mask.swift; sourceTree = ""; }; - C065A92A4856CC2DB6DB244CAC3A30AE /* TransformLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TransformLayer.swift; path = Sources/Private/CoreAnimation/Layers/TransformLayer.swift; sourceTree = ""; }; - C3393261BD09B5830EC8DA5A14E129A2 /* Entry+Serialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Entry+Serialization.swift"; path = "Sources/Private/Model/DotLottie/ZipFoundation/Entry+Serialization.swift"; sourceTree = ""; }; - C38F2EC7CF5E8AD41B8FAB241E17CD8B /* ShapeLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShapeLayer.swift; path = Sources/Private/CoreAnimation/Layers/ShapeLayer.swift; sourceTree = ""; }; - C5867C58A0C73144430774A1316DC4AE /* Interpolatable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Interpolatable.swift; path = Sources/Public/Keyframes/Interpolatable.swift; sourceTree = ""; }; - C60EA2DCBF36F2EA3F8C48A8D7B7085C /* AnimationTime.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimationTime.swift; path = Sources/Public/Primitives/AnimationTime.swift; sourceTree = ""; }; - C6500C68360C37E4CE72AA9E50229D2E /* InfiniteOpaqueAnimationLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InfiniteOpaqueAnimationLayer.swift; path = Sources/Private/CoreAnimation/Layers/InfiniteOpaqueAnimationLayer.swift; sourceTree = ""; }; - C69CC6A8D77FC3AB0AD3B2EA9ED25AEF /* PointValueProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PointValueProvider.swift; path = Sources/Public/DynamicProperties/ValueProviders/PointValueProvider.swift; sourceTree = ""; }; - C70399940B2AB7BA6AD10FB01276A62C /* RoundedCorners.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RoundedCorners.swift; path = Sources/Private/Model/ShapeItems/RoundedCorners.swift; sourceTree = ""; }; - C7E5F4C31D611ED8D99F0643BA58FD87 /* DefaultAnimationCache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DefaultAnimationCache.swift; path = Sources/Public/AnimationCache/DefaultAnimationCache.swift; sourceTree = ""; }; - C935C69DD539E3E26563528D513DBB3D /* Pods-StylableSwiftUI_Tests */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-StylableSwiftUI_Tests"; path = Pods_StylableSwiftUI_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - C96212AFFFAA9CD4765F3F8ADE72C751 /* MainThreadAnimationLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MainThreadAnimationLayer.swift; path = Sources/Private/MainThread/LayerContainers/MainThreadAnimationLayer.swift; sourceTree = ""; }; - C9690E429EE5142965B6B5864E0BA45E /* Archive+Writing.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Archive+Writing.swift"; path = "Sources/Private/Model/DotLottie/ZipFoundation/Archive+Writing.swift"; sourceTree = ""; }; - C96DEBFCF9769E765C9F2B0EE48A6D79 /* Archive+MemoryFile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Archive+MemoryFile.swift"; path = "Sources/Private/Model/DotLottie/ZipFoundation/Archive+MemoryFile.swift"; sourceTree = ""; }; - C99F5F690B21C8E5E31894EC49B5C03E /* ItemsExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ItemsExtension.swift; path = Sources/Private/MainThread/NodeRenderSystem/Extensions/ItemsExtension.swift; sourceTree = ""; }; - CB9389E47C69B08C8EC19C16E8C1A000 /* DotLottieAnimation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DotLottieAnimation.swift; path = Sources/Private/Model/DotLottie/DotLottieAnimation.swift; sourceTree = ""; }; - CBA5B3ABB76CB716FC85F75FB990E200 /* LayerDebugging.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayerDebugging.swift; path = Sources/Private/Utility/Debugging/LayerDebugging.swift; sourceTree = ""; }; - CE70B381A5AED2BE1D5295F3B36E0E17 /* LayerModel+makeAnimationLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "LayerModel+makeAnimationLayer.swift"; path = "Sources/Private/CoreAnimation/Layers/LayerModel+makeAnimationLayer.swift"; sourceTree = ""; }; - CF2814C1D35F58837DA0DACB3B4CD05B /* GradientStrokeNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GradientStrokeNode.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientStrokeNode.swift; sourceTree = ""; }; - CFBAF28B6D5E045AD5C92F73A7B959CA /* TextLayerModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TextLayerModel.swift; path = Sources/Private/Model/Layers/TextLayerModel.swift; sourceTree = ""; }; - CFDA08DDDF2BC1523A23523B79BAAAF4 /* NodePropertyMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NodePropertyMap.swift; path = Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/NodePropertyMap.swift; sourceTree = ""; }; - D04997492E5064C8892D86EE8B2366F8 /* CurveVertex.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CurveVertex.swift; path = Sources/Private/Utility/Primitives/CurveVertex.swift; sourceTree = ""; }; - D104DE562992F0AEBED5664153E99598 /* CALayer+setupLayerHierarchy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CALayer+setupLayerHierarchy.swift"; path = "Sources/Private/CoreAnimation/Layers/CALayer+setupLayerHierarchy.swift"; sourceTree = ""; }; - D1AFFCB4ED94E53358CEB9F6337985D0 /* LottieAnimationHelpers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LottieAnimationHelpers.swift; path = Sources/Public/Animation/LottieAnimationHelpers.swift; sourceTree = ""; }; - D1DD3D846172B29A86C7B9A95EF86EE7 /* Pods-StylableSwiftUI_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-StylableSwiftUI_Example-umbrella.h"; sourceTree = ""; }; - D225DAD71A0984582FFC08D4F1A269CE /* GradientAnimations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GradientAnimations.swift; path = Sources/Private/CoreAnimation/Animations/GradientAnimations.swift; sourceTree = ""; }; - D5DE2F19AA3845094A0B570B7C07481B /* ImageCacheKey.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ImageCacheKey.swift; sourceTree = ""; }; - DA19A14438B5CDCBD305AE559EBF010B /* ColorValueProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ColorValueProvider.swift; path = Sources/Public/DynamicProperties/ValueProviders/ColorValueProvider.swift; sourceTree = ""; }; - DA9686B9917AC05A8CBD492881A55AF6 /* PolygonNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PolygonNode.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/PolygonNode.swift; sourceTree = ""; }; - DB201DC824B1F59E5A325CD6091694D5 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; - DB4C94D7A63F4512314EAC7D363007B4 /* StylableSwiftUI.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = StylableSwiftUI.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - DB59410BD4B33BFA0D84778BD00D3306 /* lottie-ios-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "lottie-ios-umbrella.h"; sourceTree = ""; }; - DB85F37B82C841B6E3C2F465EB3583C0 /* LottieAnimationViewBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LottieAnimationViewBase.swift; path = Sources/Public/iOS/LottieAnimationViewBase.swift; sourceTree = ""; }; - DE6F58B7BBD868A401EB937A2A3451CA /* Bundle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bundle.swift; path = Sources/Private/Model/Extensions/Bundle.swift; sourceTree = ""; }; - DEBA48D49EF511FEB1C4FB87AE7BE76C /* FilepathImageProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FilepathImageProvider.swift; path = Sources/Public/iOS/FilepathImageProvider.swift; sourceTree = ""; }; - DEE4296A2044CDB4CE9111940229C77C /* PreCompLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PreCompLayer.swift; path = Sources/Private/CoreAnimation/Layers/PreCompLayer.swift; sourceTree = ""; }; - DFA0310269DAB4D83FBDB53A5DBFBF7C /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; name = README.md; path = Sources/Private/Model/DotLottie/ZipFoundation/README.md; sourceTree = ""; }; - DFACA3F314B71639262F45835CBBB15D /* Pods-StylableSwiftUI_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-StylableSwiftUI_Tests-dummy.m"; sourceTree = ""; }; - DFDACE549DEA24FD229DFF313B675623 /* Pods-StylableSwiftUI_Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-StylableSwiftUI_Example-Info.plist"; sourceTree = ""; }; - DFF8464A45E2C7F7654D994AF648AC2B /* AnyNodeProperty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyNodeProperty.swift; path = Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/AnyNodeProperty.swift; sourceTree = ""; }; - E06DDD418B7962A6CC197317DB833F52 /* lottie-ios.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "lottie-ios.release.xcconfig"; sourceTree = ""; }; - E0933AF34B2F793722820CD9AB54760A /* StylableAnimatedView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StylableAnimatedView.swift; path = StylableSwiftUI/Classes/Animated/StylableAnimatedView.swift; sourceTree = ""; }; - E0E186BFBFD92C28C98FBC568692D2C3 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; - E0F19BF2D2649E4086CA20DE7D77F160 /* GroupInterpolator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupInterpolator.swift; path = Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueProviders/GroupInterpolator.swift; sourceTree = ""; }; - E16B67A667AE9828C76FA09992750367 /* KeyedDecodingContainerExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KeyedDecodingContainerExtensions.swift; path = Sources/Private/Model/Extensions/KeyedDecodingContainerExtensions.swift; sourceTree = ""; }; - E59C775D88C896B5883F2C57DE7AE6E4 /* Rectangle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rectangle.swift; path = Sources/Private/Model/ShapeItems/Rectangle.swift; sourceTree = ""; }; - E5E1C3F545FCA8AB4CACE16DD87EC8BB /* DotLottieFileHelpers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DotLottieFileHelpers.swift; path = Sources/Public/DotLottie/DotLottieFileHelpers.swift; sourceTree = ""; }; - E74517BA80494683913698A996545664 /* AnimatedButton.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimatedButton.swift; path = Sources/Public/iOS/AnimatedButton.swift; sourceTree = ""; }; - E830B2AF26F057D839F8407913F2593D /* SwiftLint.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftLint.debug.xcconfig; sourceTree = ""; }; - E855DB375C7F524DED234395D11CA685 /* ShapeItemLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShapeItemLayer.swift; path = Sources/Private/CoreAnimation/Layers/ShapeItemLayer.swift; sourceTree = ""; }; - EA1768BE0972032AFADC0492F7638A19 /* AnimationKeypath.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimationKeypath.swift; path = Sources/Public/DynamicProperties/AnimationKeypath.swift; sourceTree = ""; }; - EB88885EE720E02175B70BA43D82B8D6 /* AnimationLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimationLayer.swift; path = Sources/Private/CoreAnimation/Layers/AnimationLayer.swift; sourceTree = ""; }; - EB94B17435098D702C5D61BB233030AA /* Shape.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Shape.swift; path = Sources/Private/Model/ShapeItems/Shape.swift; sourceTree = ""; }; - EC33B5FCD5BFFFA72E81F432E1ADA216 /* StylableView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StylableView.swift; path = StylableSwiftUI/Classes/Core/StylableView.swift; sourceTree = ""; }; - EC49DF6C51F55C3512E5500179C5BAE8 /* Group.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Group.swift; path = Sources/Private/Model/ShapeItems/Group.swift; sourceTree = ""; }; - EC867A84365C0990DDAA7C9A8053B96C /* ShapeContainerLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShapeContainerLayer.swift; path = Sources/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeContainerLayer.swift; sourceTree = ""; }; - EE54C77D2362DD6A792578761D2E6A5A /* LayerProperty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LayerProperty.swift; path = Sources/Private/CoreAnimation/Animations/LayerProperty.swift; sourceTree = ""; }; - EF6A987B215E4DD52A4C0F8C51345BD4 /* CachedImageProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CachedImageProvider.swift; path = Sources/Private/MainThread/LayerContainers/Utility/CachedImageProvider.swift; sourceTree = ""; }; - F079C5CA74C91008C11ACFA06B3FD539 /* VisibilityAnimation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VisibilityAnimation.swift; path = Sources/Private/CoreAnimation/Animations/VisibilityAnimation.swift; sourceTree = ""; }; - F0B6EB877EB3E9E31E0E35878A5FC8E8 /* PreCompLayerModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PreCompLayerModel.swift; path = Sources/Private/Model/Layers/PreCompLayerModel.swift; sourceTree = ""; }; - F1681737DF82EB21510ED77275272363 /* AnimatedView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimatedView.swift; path = StylableSwiftUI/Classes/Animated/AnimatedView.swift; sourceTree = ""; }; - F1DDA8F3ADD379F0DB8A5DA88869D309 /* AnyValueProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyValueProvider.swift; path = Sources/Public/DynamicProperties/AnyValueProvider.swift; sourceTree = ""; }; - F22EC137D59B5D74B4F896B51AF5ADD4 /* Stylist+UIKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Stylist+UIKit.swift"; sourceTree = ""; }; - F723C8194BB296B289FFA791D3BCF72D /* Pods-StylableSwiftUI_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-StylableSwiftUI_Example-dummy.m"; sourceTree = ""; }; - F75CF52500CC95A7E587D33A583C61EC /* StringExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StringExtensions.swift; path = Sources/Private/Utility/Extensions/StringExtensions.swift; sourceTree = ""; }; - F7A84A8285CF7AA3A98ACE2E791CE931 /* AssetLibrary.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssetLibrary.swift; path = Sources/Private/Model/Assets/AssetLibrary.swift; sourceTree = ""; }; - FA3865DFBFA39F028786FB8E27CA0FDB /* CAAnimation+TimingConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CAAnimation+TimingConfiguration.swift"; path = "Sources/Private/CoreAnimation/Animations/CAAnimation+TimingConfiguration.swift"; sourceTree = ""; }; - FB3B4D211235F44157232DB1C9667D1F /* BaseCompositionLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BaseCompositionLayer.swift; path = Sources/Private/CoreAnimation/Layers/BaseCompositionLayer.swift; sourceTree = ""; }; - FC1602C29B40B6F673AC49470C419EE0 /* DictionaryInitializable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DictionaryInitializable.swift; path = Sources/Private/Model/DictionaryInitializable.swift; sourceTree = ""; }; - FE1C610834AD81018C739D6A81F0A51F /* ShapeNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShapeNode.swift; path = Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/ShapeNode.swift; sourceTree = ""; }; - FE6B10FC9B6553E833B4B741AC706574 /* Data+Serialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data+Serialization.swift"; path = "Sources/Private/Model/DotLottie/ZipFoundation/Data+Serialization.swift"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 23A42EB721ACD2219792ABA4F3CC470D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - D307C5AA3E196A7F0D831C202FFFC80F /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 427833E0416842E5E86D55548A5EB48E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - D55419E97EAB8AFE4651C03253922D1A /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7DA40D56495122C3BF825F1C20279F2F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BE429CF6CF0BBC223EB593C6645DC76A /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A30D4F0469EBBCC65237C35A29DC1CA6 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - AB324DED8AD1A8C54026CF17787EBCF9 /* CoreGraphics.framework in Frameworks */, - 7B1F24E382D3841703472CB935E99BF9 /* Foundation.framework in Frameworks */, - CF97E6A52B2DADAF6066C0B7A038CD79 /* QuartzCore.framework in Frameworks */, - 2BC4685CB8B97D9205AAE955634FF0AD /* UIKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 0465D7899E060B641FDC72D5C382BABA /* Products */ = { - isa = PBXGroup; - children = ( - 51BA97E8B5085EFFB47BC9C0B785CEA7 /* lottie-ios */, - 4D264895CCBA0EBE166161B519945234 /* Pods-StylableSwiftUI_Example */, - C935C69DD539E3E26563528D513DBB3D /* Pods-StylableSwiftUI_Tests */, - 94DA90434E0D0EAAB0CF3526CEB83492 /* StylableSwiftUI */, - ); - name = Products; - sourceTree = ""; - }; - 09D3B6BFBF008283D501EC0A918A6E61 /* Targets Support Files */ = { - isa = PBXGroup; - children = ( - 4D0F6045208622CF0517DB438ABF8838 /* Pods-StylableSwiftUI_Example */, - D1CCE040640CE5389AEC045A24EBEE15 /* Pods-StylableSwiftUI_Tests */, - ); - name = "Targets Support Files"; - sourceTree = ""; - }; - 1598AC5DAB8687BC5A646765A25069C3 /* lottie-ios */ = { - isa = PBXGroup; - children = ( - E74517BA80494683913698A996545664 /* AnimatedButton.swift */, - 64A131420EEC9DBF8FE156EF442B66A5 /* AnimatedControl.swift */, - AFCD7E832A05E73DD358E082FB5E700A /* AnimatedSwitch.swift */, - 4E98E8A19AE5C1E5E31EC911B6E6D86A /* AnimationCacheProvider.swift */, - 427C2A4415D436636E0222B1D1F2FAB7 /* AnimationContext.swift */, - 7A33462BE2CFD5A9EB5F99E734E43B41 /* AnimationFontProvider.swift */, - AFC743A856BE35274944E60AFA0F58BC /* AnimationImageProvider.swift */, - EA1768BE0972032AFADC0492F7638A19 /* AnimationKeypath.swift */, - 0B0B6DF879416BE682F7947873E61E6B /* AnimationKeypathExtension.swift */, - EB88885EE720E02175B70BA43D82B8D6 /* AnimationLayer.swift */, - 190559FCF8041CCD9284DBA67BFF77A9 /* AnimationSubview.swift */, - 1C9C2C391D817498C92F2D076411BE85 /* AnimationTextProvider.swift */, - C60EA2DCBF36F2EA3F8C48A8D7B7085C /* AnimationTime.swift */, - B197F95D0FB8F2408171B5FD7F8FB0FB /* AnimatorNode.swift */, - 219F3E5B8DC36E56485248D8EE2350E6 /* AnimatorNodeDebugging.swift */, - DFF8464A45E2C7F7654D994AF648AC2B /* AnyNodeProperty.swift */, - ACC2B61039887F638597C27AB420F5C5 /* AnyValueContainer.swift */, - F1DDA8F3ADD379F0DB8A5DA88869D309 /* AnyValueProvider.swift */, - 0A57450AB14D15A2E8414FE06874B03D /* Archive.swift */, - 174E77D896BF5E9E1BD93A02D5E13801 /* Archive+BackingConfiguration.swift */, - 4C2AB118BADEABE2FD0BE198C4F91DB1 /* Archive+Helpers.swift */, - C96DEBFCF9769E765C9F2B0EE48A6D79 /* Archive+MemoryFile.swift */, - 55561C0899B02D83688E7FAA051F1B3B /* Archive+Progress.swift */, - 9B6AC46F91806B292B0C5BEDD4609189 /* Archive+Reading.swift */, - 4ECFFFB7C1BD882046A2E8F945BA1173 /* Archive+ReadingDeprecated.swift */, - C9690E429EE5142965B6B5864E0BA45E /* Archive+Writing.swift */, - 66DDB7768F30960D4C02F16C0051F431 /* Archive+WritingDeprecated.swift */, - 3DE61A43627A1743FD0428388283C1D6 /* Archive+ZIP64.swift */, - 28F4A3F5E81F7333E50CA0EC76A6DF98 /* Asset.swift */, - F7A84A8285CF7AA3A98ACE2E791CE931 /* AssetLibrary.swift */, - B931CB344275A89B58D4972A6F8F8C1C /* BaseAnimationLayer.swift */, - FB3B4D211235F44157232DB1C9667D1F /* BaseCompositionLayer.swift */, - 13BC22AD4B48B4F7AA7308AF9DFA4280 /* BezierPath.swift */, - 2956630ECEDACC0F465F674259E62A06 /* BezierPathRoundExtension.swift */, - AE7155A358A846722D6D3E525F62CE3E /* BlendMode+Filter.swift */, - DE6F58B7BBD868A401EB937A2A3451CA /* Bundle.swift */, - 53FE7236641CC3A043656BFC31493040 /* BundleImageProvider.swift */, - FA3865DFBFA39F028786FB8E27CA0FDB /* CAAnimation+TimingConfiguration.swift */, - EF6A987B215E4DD52A4C0F8C51345BD4 /* CachedImageProvider.swift */, - 7F3B6069E75F3B792ACD1466BEACC687 /* CALayer+addAnimation.swift */, - 83988A8E04DCE4F689E703DD473D1FBB /* CALayer+fillBounds.swift */, - D104DE562992F0AEBED5664153E99598 /* CALayer+setupLayerHierarchy.swift */, - 1D3116184EBD150817DD4FC95D111A5C /* CGColor+RGB.swift */, - 410F6554B7D5CD374986DF597E1CB849 /* CGFloatExtensions.swift */, - 894D17A79761C94C924A53F563EB150E /* CGPointExtension.swift */, - 4061C485992396262E9EEBED2962BB7C /* ColorExtension.swift */, - DA19A14438B5CDCBD305AE559EBF010B /* ColorValueProvider.swift */, - 7D0FE6816E4D3E5029E24076602A0E35 /* CombinedShapeAnimation.swift */, - 04B5A8E01E6C7B836039FAB45DA75D05 /* CompatibilityTracker.swift */, - A07A4FE15A65A4CA7EC058B0C4A3C49C /* CompatibleAnimationKeypath.swift */, - 96B1CC369AF58D38706D8A35EDBC98BE /* CompatibleAnimationView.swift */, - 87B57FCC02C73C8DC5597A330E42FB74 /* CompositionLayer.swift */, - 1F886090B48EBB6EFF58BEF4F423F780 /* CompositionLayersInitializer.swift */, - 30EF988690CE4441AF4F38731D087301 /* CompoundBezierPath.swift */, - 71FA9DD23C9D07F4C3C58E550F48D968 /* CoreAnimationLayer.swift */, - 3A6336F632C2FC71A4F67E3DD6F7032A /* CoreTextRenderLayer.swift */, - D04997492E5064C8892D86EE8B2366F8 /* CurveVertex.swift */, - 7AABF2EB694F8949FD54BF0130B1FC18 /* CustomPathAnimation.swift */, - 3D90B227BECBBBB747E7C44DEFE6B459 /* DashPattern.swift */, - A4288F0FAB59A7FFC07BF8A9128032A6 /* Data+Compression.swift */, - 1BCCB85EA80D9653E7190EE63E5673B2 /* Data+CompressionDeprecated.swift */, - FE6B10FC9B6553E833B4B741AC706574 /* Data+Serialization.swift */, - A4E019F5247F636D8BD4E0567EAE681D /* DataExtension.swift */, - C7E5F4C31D611ED8D99F0643BA58FD87 /* DefaultAnimationCache.swift */, - FC1602C29B40B6F673AC49470C419EE0 /* DictionaryInitializable.swift */, - CB9389E47C69B08C8EC19C16E8C1A000 /* DotLottieAnimation.swift */, - 311704F5DE9E45691BA3263E709ABC72 /* DotLottieCache.swift */, - 1253B1031382929A684699D3207EE5E4 /* DotLottieCacheProvider.swift */, - 280579E6328833F20052AA3E19A52C98 /* DotLottieConfiguration.swift */, - 57728E1D5FA3A74AD26544313F03BF14 /* DotLottieFile.swift */, - E5E1C3F545FCA8AB4CACE16DD87EC8BB /* DotLottieFileHelpers.swift */, - B265AB034C62B0BFD1E9E783871705BF /* DotLottieImageProvider.swift */, - 92A3CE9639E1020EB4B1BFBC3BB39C76 /* DotLottieManifest.swift */, - 7F922F0E282E5B804D581957046BA74D /* DotLottieUtils.swift */, - 7A777B66E6E54AB58F3AE649FC1216BA /* Ellipse.swift */, - 92BEBF1A2DF4475C8370B1886AC9F0C1 /* EllipseAnimation.swift */, - 4805880B15F5B22FDEE4FCD3D1F64E69 /* EllipseNode.swift */, - 1B9AFEAC4B3361B5BCC1A7E4C9D84E49 /* Entry.swift */, - C3393261BD09B5830EC8DA5A14E129A2 /* Entry+Serialization.swift */, - 1F453944467880597DD001CBF6AF6CF9 /* Entry+ZIP64.swift */, - 8DEB47F5C01CF8490BCFD30F1D70D8E8 /* FileManager+ZIP.swift */, - DEBA48D49EF511FEB1C4FB87AE7BE76C /* FilepathImageProvider.swift */, - A3454023F37858BA68A8CDC7DC0C5241 /* Fill.swift */, - 8081B23007DC9C86C8BC003A290A21F0 /* FillNode.swift */, - BDA58E6521C53473476AD7BB70F5E30A /* FillRenderer.swift */, - 31791B2E1B89F1553A5EBB031FEE0CFA /* FloatValueProvider.swift */, - 751203E731CBCA290BB284D4C5AA4B70 /* Font.swift */, - 690576955D994308284C9490EFA17D64 /* Glyph.swift */, - D225DAD71A0984582FFC08D4F1A269CE /* GradientAnimations.swift */, - 737880B0E1E7092B11793572FFBCCCAF /* GradientFill.swift */, - 6790AF1EA295E7FA8A4C3B569903BC55 /* GradientFillNode.swift */, - BC302F992F103F2A60DAEC0D6D53A35B /* GradientFillRenderer.swift */, - 4A36AA71A56A88293C9341811F490663 /* GradientRenderLayer.swift */, - B5D0760C8AE6581BB0D401726801BD5D /* GradientStroke.swift */, - CF2814C1D35F58837DA0DACB3B4CD05B /* GradientStrokeNode.swift */, - 621C85D310F83D7028749A9ACEE3D98F /* GradientStrokeRenderer.swift */, - 69807F540F6E4AEDA1B5276F46A9E54F /* GradientValueProvider.swift */, - EC49DF6C51F55C3512E5500179C5BAE8 /* Group.swift */, - E0F19BF2D2649E4086CA20DE7D77F160 /* GroupInterpolator.swift */, - 655BE3AC3BBDF289257FB5E619A99007 /* GroupNode.swift */, - 2BEA83C23BEB40FD5F6F2B297337E437 /* GroupOutputNode.swift */, - 79D58E782A4FEB5B1AB1A248F857A452 /* ImageAsset.swift */, - BEB0522A3914477D6A8A561B81ADF280 /* ImageCompositionLayer.swift */, - 5D0863E693FECE5E07CDD16DFFD26ACC /* ImageLayer.swift */, - 814F06F388F67D797E9760EBF71409C8 /* ImageLayerModel.swift */, - C6500C68360C37E4CE72AA9E50229D2E /* InfiniteOpaqueAnimationLayer.swift */, - C5867C58A0C73144430774A1316DC4AE /* Interpolatable.swift */, - 9E054A240EEC6DD8B3F9E68BB1F933C8 /* InterpolatableExtensions.swift */, - 21202759E0FA0092041253D3012D6E33 /* InvertedMatteLayer.swift */, - C99F5F690B21C8E5E31894EC49B5C03E /* ItemsExtension.swift */, - E16B67A667AE9828C76FA09992750367 /* KeyedDecodingContainerExtensions.swift */, - B82B68B4F21AB7FF0BB1CE9F0227A797 /* Keyframe.swift */, - 6CCF288742A5EF8F4C0EBBB95DF964BD /* KeyframeData.swift */, - 1911DCEB23CB37CA72A6F8E78379F159 /* KeyframeExtensions.swift */, - 3580C7CA4BD67158B48E492FC300CAFE /* KeyframeGroup.swift */, - 0E24C849FAE0005C0F71C2956A650E94 /* KeyframeGroup+exactlyOneKeyframe.swift */, - 49D83A5FA1B1BCB3BC4579C0C56922DB /* KeyframeInterpolator.swift */, - 3E096908229D8038AAC6C95CDC5DFE17 /* Keyframes+combined.swift */, - 61AD68895278FFE4EC86F446A30AA2D8 /* KeypathSearchable.swift */, - CBA5B3ABB76CB716FC85F75FB990E200 /* LayerDebugging.swift */, - 9C41A3000297B704EB9FDA924E4FA328 /* LayerFontProvider.swift */, - 025931CA8280187F6188A307483A072B /* LayerImageProvider.swift */, - 5BA324DEE8CC2750C646F874285C6F52 /* LayerModel.swift */, - CE70B381A5AED2BE1D5295F3B36E0E17 /* LayerModel+makeAnimationLayer.swift */, - EE54C77D2362DD6A792578761D2E6A5A /* LayerProperty.swift */, - 45184BDE668BD817DFAF090B3E7F7F22 /* LayerTextProvider.swift */, - 7BADE19128CCD5CA2FF95B6628CC7057 /* LayerTransformNode.swift */, - A6CB812610667A32952B63FFF7D1C179 /* LegacyGradientFillRenderer.swift */, - 685FA9AD07F15710B4C0162C3908B6A7 /* LottieAnimation.swift */, - 1602402F8CAEE21DE695BA04ACF165A8 /* LottieAnimationCache.swift */, - D1AFFCB4ED94E53358CEB9F6337985D0 /* LottieAnimationHelpers.swift */, - A08F02545DED91877ACCC02A7030DBC6 /* LottieAnimationView.swift */, - DB85F37B82C841B6E3C2F465EB3583C0 /* LottieAnimationViewBase.swift */, - 0FC22E98B82B7503366D2097E29513C7 /* LottieAnimationViewInitializers.swift */, - 27A4C6C08A4C12ADEE60E0656C735428 /* LottieColor.swift */, - 7F2F48CE8F4C53DF90DBA7D045A10FEF /* LottieConfiguration.swift */, - 22B282ECA91D04DC2A3C365CD20C2FC6 /* LottieLogger.swift */, - 5773466217AC6458C99D06514DEC3658 /* LRUAnimationCache.swift */, - C96212AFFFAA9CD4765F3F8ADE72C751 /* MainThreadAnimationLayer.swift */, - 01CD37B6472CDACDED98726DB0499BA8 /* Marker.swift */, - C0137717EFF398E73CBBCC466DEFE0FD /* Mask.swift */, - 7E59DD9B01EEE0A4F9E13DBBA787E26A /* MaskCompositionLayer.swift */, - A8B54BB8BB44B79D37E2BD7A56E354DF /* MaskContainerLayer.swift */, - 8DD9BD35B7E1EF4BD59AD8203A803D0B /* MathKit.swift */, - 486F96513F2076920E54951396C0814C /* Merge.swift */, - 9DB7800CC2768F722E271D886A5986FC /* NodeProperty.swift */, - CFDA08DDDF2BC1523A23523B79BAAAF4 /* NodePropertyMap.swift */, - 7EE3C927B618D95277B31D32CD91CCF8 /* NullCompositionLayer.swift */, - 6AFC26D2CD8DAB417851EA85A40CC552 /* OpacityAnimation.swift */, - 64452E5A53D7ECF74159CC822D870E91 /* PassThroughOutputNode.swift */, - 9A3855A0E688003F387191CB7B030B75 /* PathElement.swift */, - 9A264712D5620CE877230F7D52D85DD1 /* PathNode.swift */, - 76D1D13684378C6C7B85D9C0C5444F80 /* PathOutputNode.swift */, - C69CC6A8D77FC3AB0AD3B2EA9ED25AEF /* PointValueProvider.swift */, - DA9686B9917AC05A8CBD492881A55AF6 /* PolygonNode.swift */, - 438F330404FBC73C2428A5F827736977 /* PrecompAsset.swift */, - DEE4296A2044CDB4CE9111940229C77C /* PreCompLayer.swift */, - F0B6EB877EB3E9E31E0E35878A5FC8E8 /* PreCompLayerModel.swift */, - 30F26CFA7FD328979FB7546B9C6C44CA /* PreCompositionLayer.swift */, - DFA0310269DAB4D83FBDB53A5DBFBF7C /* README.md */, - E59C775D88C896B5883F2C57DE7AE6E4 /* Rectangle.swift */, - 37CD009FE68D83B338431A5D54EBD837 /* RectangleAnimation.swift */, - 8C10BD553FFC30327E9957405377BE85 /* RectNode.swift */, - 4B9C3B8641E38BF0043867A788B3C3BD /* RenderNode.swift */, - AB49ECB1CE9BC857C544BE182C20A526 /* Repeater.swift */, - 90F3273253250267E9C717109E851CE6 /* RepeaterLayer.swift */, - 286BD6122BE613BFD06713144EAA80BF /* RootAnimationLayer.swift */, - C70399940B2AB7BA6AD10FB01276A62C /* RoundedCorners.swift */, - 52E21FD9EEC4EE82821C74D328734EBE /* RoundedCornersNode.swift */, - EB94B17435098D702C5D61BB233030AA /* Shape.swift */, - 22E35A1B3B8B4E406F876A3D17F350B2 /* ShapeAnimation.swift */, - 58A78D2A7D771497AE0A2F4326FA55F2 /* ShapeCompositionLayer.swift */, - EC867A84365C0990DDAA7C9A8053B96C /* ShapeContainerLayer.swift */, - 9B4607D7E1EF6FEB680B2DC751170E6C /* ShapeItem.swift */, - E855DB375C7F524DED234395D11CA685 /* ShapeItemLayer.swift */, - C38F2EC7CF5E8AD41B8FAB241E17CD8B /* ShapeLayer.swift */, - 49A7EF574EB900FE8CEED3971EDD2E06 /* ShapeLayerModel.swift */, - FE1C610834AD81018C739D6A81F0A51F /* ShapeNode.swift */, - 80ED95B074263139503ED9EB09946042 /* ShapeRenderLayer.swift */, - 7FE45B5AE49E995CAA4CF30E8C6A4F13 /* ShapeTransform.swift */, - 847AA8DD8160B3BF21DF95062BFA2131 /* SingleValueProvider.swift */, - 8E9574D70626EF1953D672B9697FEA46 /* SizeValueProvider.swift */, - 096AC4A863FA4A3B0CC608F3480F17C7 /* SolidCompositionLayer.swift */, - 03B43F035DBC52E85599E55F12D2DE9D /* SolidLayer.swift */, - 5142FAFF92184807A3E8DCE2A4F5BC4D /* SolidLayerModel.swift */, - 7C2209A5E70F2497ED9341B6A84E86F9 /* Star.swift */, - 5413CEF6AC8676FD3F274D82F8C6F09C /* StarAnimation.swift */, - BB94DEAE23EA9E2FE91F0BA4CDCEB0AC /* StarNode.swift */, - F75CF52500CC95A7E587D33A583C61EC /* StringExtensions.swift */, - 4B29E5E277D7CAFEBDCC8669B87C68EE /* Stroke.swift */, - 4D49C447EE7DE246F02E4B82FCE7CC3F /* StrokeAnimation.swift */, - 1A2A39AFA7DB17FFF4DD41FF70451758 /* StrokeNode.swift */, - 8FC331E6497011946B78CC64FFF284B4 /* StrokeRenderer.swift */, - 15BC4C7FC845A035490CBAE3DC5E84E4 /* TestHelpers.swift */, - 63450EFD96965F1DB79FFC32813CCB36 /* TextAnimator.swift */, - 7AD83FC271EBC525F28763724D3FBB64 /* TextAnimatorNode.swift */, - 5EC4CB4F0C18CE61145F6ADEA682DAA9 /* TextCompositionLayer.swift */, - 4FB503F0443198EB9CF8BCEFF1FC2851 /* TextDocument.swift */, - A58A00F5CA69F312B32665D9FB60CA74 /* TextLayer.swift */, - CFBAF28B6D5E045AD5C92F73A7B959CA /* TextLayerModel.swift */, - 50C9B48E6A456887593D058FC1A34252 /* Transform.swift */, - AB0ED10C540F0D243A7FB15C4FB737FA /* TransformAnimations.swift */, - C065A92A4856CC2DB6DB244CAC3A30AE /* TransformLayer.swift */, - 82F18E39E30BFC2753D9AA1285A15756 /* Trim.swift */, - A01183CA20B3B4BCE3C32F072E59736B /* TrimPathNode.swift */, - 78CF1ED20F1995AA06DE9CB6D440C19C /* UIColorExtension.swift */, - 99E7381DB38D3BE8FE63B5BD9066E109 /* UnitBezier.swift */, - A6BDB3FFBA0A5323E9D4C2EFEB08CC3E /* URL+ZIP.swift */, - 95C35E35238B7F727FFFABE3E6091599 /* ValueContainer.swift */, - 382764C703625158642D5B5DD9B301E8 /* ValueProviderStore.swift */, - 74B5D62FA2057581C4A52E7242AB179A /* Vectors.swift */, - A351988FDCCE733781B021A0FDCB3483 /* VectorsExtensions.swift */, - F079C5CA74C91008C11ACFA06B3FD539 /* VisibilityAnimation.swift */, - A427162C69CED6C2E7F68DC89BB6AF9C /* Support Files */, - ); - name = "lottie-ios"; - path = "lottie-ios"; - sourceTree = ""; - }; - 247F03018D942C1BBC57A9C0CCFF5307 /* ImageCache */ = { - isa = PBXGroup; - children = ( - 37749CBEC7056AA3EB2E3EC3955659C0 /* ImageCache.swift */, - D5DE2F19AA3845094A0B570B7C07481B /* ImageCacheKey.swift */, - ); - name = ImageCache; - path = StylableSwiftUI/Classes/Core/ImageCache; - sourceTree = ""; - }; - 4D0F6045208622CF0517DB438ABF8838 /* Pods-StylableSwiftUI_Example */ = { - isa = PBXGroup; - children = ( - 76934AC8F2F3DB2A040A6B745D452C81 /* Pods-StylableSwiftUI_Example.modulemap */, - 6353A0FAF5B070146EB93E6811374357 /* Pods-StylableSwiftUI_Example-acknowledgements.markdown */, - AE4841F90C84ED9782C2BC3470D4DA2A /* Pods-StylableSwiftUI_Example-acknowledgements.plist */, - F723C8194BB296B289FFA791D3BCF72D /* Pods-StylableSwiftUI_Example-dummy.m */, - 4BE4AFFD13D1E96322CBE259DFE4E8C3 /* Pods-StylableSwiftUI_Example-frameworks.sh */, - DFDACE549DEA24FD229DFF313B675623 /* Pods-StylableSwiftUI_Example-Info.plist */, - D1DD3D846172B29A86C7B9A95EF86EE7 /* Pods-StylableSwiftUI_Example-umbrella.h */, - 30AFE4E822B18CEC1E51FF698D5012BF /* Pods-StylableSwiftUI_Example.debug.xcconfig */, - 2E3034F755162A44193D114320F95627 /* Pods-StylableSwiftUI_Example.release.xcconfig */, - ); - name = "Pods-StylableSwiftUI_Example"; - path = "Target Support Files/Pods-StylableSwiftUI_Example"; - sourceTree = ""; - }; - 55BD1E7D96F63FD0D1D6866C7D35774F /* Support Files */ = { - isa = PBXGroup; - children = ( - E830B2AF26F057D839F8407913F2593D /* SwiftLint.debug.xcconfig */, - 7F74452BACAF1FB9091AB0D2E30C07DC /* SwiftLint.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/SwiftLint"; - sourceTree = ""; - }; - 5ED96E014E3A04242F2D962709825871 /* Core */ = { - isa = PBXGroup; - children = ( - 6566E00AA11CEB5E635142DD4337852E /* DebugStylist.swift */, - 394DAF43496431CA4F4B997D0BE6F332 /* Logger.swift */, - 981F91999F107CBBB43FEECAC8A91E45 /* StylableGroup.swift */, - 164365CE2D6A182520BB4E67D41D1E45 /* StylableImage.swift */, - EC33B5FCD5BFFFA72E81F432E1ADA216 /* StylableView.swift */, - 6EE099272C2C6107FAAC1DE0299B0794 /* Stylist.swift */, - 912C1AE464CA327CFF3C0E0C335D6F78 /* StylistIdentifier.swift */, - 95D59CBA3554FE446027423331794FB6 /* StylistIdentifierMatcher.swift */, - 11BBA994A987D4E0260FAEE537AD935C /* Theme.swift */, - 303EAB1A6C8E2F016E13802007730066 /* ThemedStylistIdentifier.swift */, - 98A86C648EFE4CF6C08CAC25CCCA1DF0 /* View+style.swift */, - 25CE74F193121F6D4A2AD188E582A752 /* WithStyleIdentifier.swift */, - 247F03018D942C1BBC57A9C0CCFF5307 /* ImageCache */, - E43DCC2E9A04773888FF613DE767ECC1 /* UIKit */, - ); - name = Core; - sourceTree = ""; - }; - 6F41456A14D07B06F84F205A8D4B4DC6 /* SwiftLint */ = { - isa = PBXGroup; - children = ( - 55BD1E7D96F63FD0D1D6866C7D35774F /* Support Files */, - ); - name = SwiftLint; - path = SwiftLint; - sourceTree = ""; - }; - 758C760D216A740888B0E3147497FFE9 /* Pods */ = { - isa = PBXGroup; - children = ( - 1598AC5DAB8687BC5A646765A25069C3 /* lottie-ios */, - 6F41456A14D07B06F84F205A8D4B4DC6 /* SwiftLint */, - ); - name = Pods; - sourceTree = ""; - }; - A427162C69CED6C2E7F68DC89BB6AF9C /* Support Files */ = { - isa = PBXGroup; - children = ( - A13488FAD7826D29056795F1FC0492C9 /* lottie-ios.modulemap */, - 3CFCBACA305525B5FD0767C4AFF31E40 /* lottie-ios-dummy.m */, - 816D13247E81B7566A64EE5454E2E347 /* lottie-ios-Info.plist */, - A10154A62CFA7998DBC15E95D5912D20 /* lottie-ios-prefix.pch */, - DB59410BD4B33BFA0D84778BD00D3306 /* lottie-ios-umbrella.h */, - 4C7171FDB662E6F5148D15E2C59AE613 /* lottie-ios.debug.xcconfig */, - E06DDD418B7962A6CC197317DB833F52 /* lottie-ios.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/lottie-ios"; - sourceTree = ""; - }; - B724E6F7E8B3F452F258EDD1CC715979 /* StylableSwiftUI */ = { - isa = PBXGroup; - children = ( - DD8BF64A339A0F8DB2F77DB1CE9D34D0 /* Animated */, - 5ED96E014E3A04242F2D962709825871 /* Core */, - C682500C0D6922AF6ADAB40053EA302C /* Pod */, - C9FE4FF1C20594952ADD2265BE683C2A /* Support Files */, - ); - name = StylableSwiftUI; - path = ../..; - sourceTree = ""; - }; - BA4F31F07263C99FC76E66D632A59F09 /* Frameworks */ = { - isa = PBXGroup; - children = ( - F9D206BABE81E6BF0B9B23880B238CC7 /* iOS */, - ); - name = Frameworks; - sourceTree = ""; - }; - C682500C0D6922AF6ADAB40053EA302C /* Pod */ = { - isa = PBXGroup; - children = ( - DB201DC824B1F59E5A325CD6091694D5 /* LICENSE */, - E0E186BFBFD92C28C98FBC568692D2C3 /* README.md */, - DB4C94D7A63F4512314EAC7D363007B4 /* StylableSwiftUI.podspec */, - ); - name = Pod; - sourceTree = ""; - }; - C9FE4FF1C20594952ADD2265BE683C2A /* Support Files */ = { - isa = PBXGroup; - children = ( - 61B41C52B2ECF9A5CD8A69739B3FB30D /* StylableSwiftUI.modulemap */, - 13D8A40C94913A926E6DFCDD3B69E11E /* StylableSwiftUI-dummy.m */, - 1666870D14986900E7DC82776360150B /* StylableSwiftUI-Info.plist */, - 0480EC1AD0B8EFC715A9B68E9EAD06C0 /* StylableSwiftUI-prefix.pch */, - A97076C2FD6DF803D0CE41C2E59F4758 /* StylableSwiftUI-umbrella.h */, - 0D933AB707E8940C3512A2FA69316DB6 /* StylableSwiftUI.debug.xcconfig */, - B5CABB5EAB4761542524EEC781C39019 /* StylableSwiftUI.release.xcconfig */, - ); - name = "Support Files"; - path = "Example/Pods/Target Support Files/StylableSwiftUI"; - sourceTree = ""; - }; - CF1408CF629C7361332E53B88F7BD30C = { - isa = PBXGroup; - children = ( - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, - F294E015F8E96F75C3B63EF895F952BE /* Development Pods */, - BA4F31F07263C99FC76E66D632A59F09 /* Frameworks */, - 758C760D216A740888B0E3147497FFE9 /* Pods */, - 0465D7899E060B641FDC72D5C382BABA /* Products */, - 09D3B6BFBF008283D501EC0A918A6E61 /* Targets Support Files */, - ); - sourceTree = ""; - }; - D1CCE040640CE5389AEC045A24EBEE15 /* Pods-StylableSwiftUI_Tests */ = { - isa = PBXGroup; - children = ( - 1E192307550D7B254984A9E9A13251F0 /* Pods-StylableSwiftUI_Tests.modulemap */, - BDBD503D10E60553838CE5E004841BD8 /* Pods-StylableSwiftUI_Tests-acknowledgements.markdown */, - 0B82A4892A64301368F000C6EE5A539E /* Pods-StylableSwiftUI_Tests-acknowledgements.plist */, - DFACA3F314B71639262F45835CBBB15D /* Pods-StylableSwiftUI_Tests-dummy.m */, - A2AD1A2E6AACDD358DC0F2512A798033 /* Pods-StylableSwiftUI_Tests-Info.plist */, - 5F4406E2FFB9C406785A39372ACA45C9 /* Pods-StylableSwiftUI_Tests-umbrella.h */, - 5B99811236455523692133D709217227 /* Pods-StylableSwiftUI_Tests.debug.xcconfig */, - 78F2AA43F8A96E13884C58D413820334 /* Pods-StylableSwiftUI_Tests.release.xcconfig */, - ); - name = "Pods-StylableSwiftUI_Tests"; - path = "Target Support Files/Pods-StylableSwiftUI_Tests"; - sourceTree = ""; - }; - DD8BF64A339A0F8DB2F77DB1CE9D34D0 /* Animated */ = { - isa = PBXGroup; - children = ( - F1681737DF82EB21510ED77275272363 /* AnimatedView.swift */, - E0933AF34B2F793722820CD9AB54760A /* StylableAnimatedView.swift */, - ); - name = Animated; - sourceTree = ""; - }; - E43DCC2E9A04773888FF613DE767ECC1 /* UIKit */ = { - isa = PBXGroup; - children = ( - F22EC137D59B5D74B4F896B51AF5ADD4 /* Stylist+UIKit.swift */, - B8705A9991518B7B89E59F0C2170CE83 /* UIKitStyleContainer.swift */, - ); - name = UIKit; - path = StylableSwiftUI/Classes/Core/UIKit; - sourceTree = ""; - }; - F294E015F8E96F75C3B63EF895F952BE /* Development Pods */ = { - isa = PBXGroup; - children = ( - B724E6F7E8B3F452F258EDD1CC715979 /* StylableSwiftUI */, - ); - name = "Development Pods"; - sourceTree = ""; - }; - F9D206BABE81E6BF0B9B23880B238CC7 /* iOS */ = { - isa = PBXGroup; - children = ( - 840FA0B75AF62912A30DDC66B647ED98 /* CoreGraphics.framework */, - 79CF7D56C5D50C18B2EA0ED106D998C7 /* Foundation.framework */, - A42DBD2F42D55606EEBA514009498B87 /* QuartzCore.framework */, - 04D60AC13D33197690A05C641925DDDA /* UIKit.framework */, - ); - name = iOS; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 674C13689CD3B047DEC709F1F4CAA1C4 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - D7E0AF52F27E41030DD77AAD270C0A84 /* lottie-ios-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A0C6D5E5B4C917EEDDA09F0412A23F25 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - F2C1246CFDA1B125AA636166E49D083F /* Pods-StylableSwiftUI_Example-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B90CC24FA8BEB263D17303A5851FF742 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - C9BD5304752EDDC6A19F0969E73EBDDA /* Pods-StylableSwiftUI_Tests-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - C3AAE068D18A95D32207D3AC591276CF /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 497F24F21140F4D5F388E3A997B6F491 /* StylableSwiftUI-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 0B967D7F8561D42493EE289EC8D450D1 /* lottie-ios */ = { - isa = PBXNativeTarget; - buildConfigurationList = 4E3073930B38750F0C9DCCE9D9F698B2 /* Build configuration list for PBXNativeTarget "lottie-ios" */; - buildPhases = ( - 674C13689CD3B047DEC709F1F4CAA1C4 /* Headers */, - 1641C70F6012AC6B16AC4F7317320694 /* Sources */, - A30D4F0469EBBCC65237C35A29DC1CA6 /* Frameworks */, - F4DBBD3C92539BEE571CFE8565D366E3 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "lottie-ios"; - productName = Lottie; - productReference = 51BA97E8B5085EFFB47BC9C0B785CEA7 /* lottie-ios */; - productType = "com.apple.product-type.framework"; - }; - 0E12E449EA31D5414AB180DDBF51184C /* StylableSwiftUI */ = { - isa = PBXNativeTarget; - buildConfigurationList = F14C9A969EA3717E74695D39C7646766 /* Build configuration list for PBXNativeTarget "StylableSwiftUI" */; - buildPhases = ( - C3AAE068D18A95D32207D3AC591276CF /* Headers */, - 68DAD72C00561773E0E44C68601C2E1B /* Sources */, - 23A42EB721ACD2219792ABA4F3CC470D /* Frameworks */, - 24FB98A252B469D30476ADF620B45E36 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 886EEA27D1E23872070AC71AFAEED931 /* PBXTargetDependency */, - ); - name = StylableSwiftUI; - productName = StylableSwiftUI; - productReference = 94DA90434E0D0EAAB0CF3526CEB83492 /* StylableSwiftUI */; - productType = "com.apple.product-type.framework"; - }; - 4E0384231A8EAAB431B4C45C84245A95 /* Pods-StylableSwiftUI_Example */ = { - isa = PBXNativeTarget; - buildConfigurationList = 53568C37E0FB983A1DE554AEF654BC86 /* Build configuration list for PBXNativeTarget "Pods-StylableSwiftUI_Example" */; - buildPhases = ( - A0C6D5E5B4C917EEDDA09F0412A23F25 /* Headers */, - 37695BB7555E74BD502CDEF0A1769268 /* Sources */, - 7DA40D56495122C3BF825F1C20279F2F /* Frameworks */, - 7FD86EF08DDF6D828837806805F79DA0 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 4B16A20EC57525B1DB170DA802326216 /* PBXTargetDependency */, - 8F689E0C3558F08BBFE46EDB52FE03F7 /* PBXTargetDependency */, - 6B57A080C37F50263A4610F70DEBE81E /* PBXTargetDependency */, - ); - name = "Pods-StylableSwiftUI_Example"; - productName = Pods_StylableSwiftUI_Example; - productReference = 4D264895CCBA0EBE166161B519945234 /* Pods-StylableSwiftUI_Example */; - productType = "com.apple.product-type.framework"; - }; - 8884E6871B0E76FB7A9F5718E9E2180A /* Pods-StylableSwiftUI_Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = C936A24EA13B05C208D25AC648E655DF /* Build configuration list for PBXNativeTarget "Pods-StylableSwiftUI_Tests" */; - buildPhases = ( - B90CC24FA8BEB263D17303A5851FF742 /* Headers */, - 6A6D75081DE78E2805E0349CDD22E50F /* Sources */, - 427833E0416842E5E86D55548A5EB48E /* Frameworks */, - EC1CA2849514B307E51899ECC4D77391 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - BB3E3BB73E4FE8BBA45647E47A8E24CF /* PBXTargetDependency */, - ); - name = "Pods-StylableSwiftUI_Tests"; - productName = Pods_StylableSwiftUI_Tests; - productReference = C935C69DD539E3E26563528D513DBB3D /* Pods-StylableSwiftUI_Tests */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - BFDFE7DC352907FC980B868725387E98 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 1300; - LastUpgradeCheck = 1300; - }; - buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 12.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - Base, - en, - ); - mainGroup = CF1408CF629C7361332E53B88F7BD30C; - productRefGroup = 0465D7899E060B641FDC72D5C382BABA /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 0B967D7F8561D42493EE289EC8D450D1 /* lottie-ios */, - 4E0384231A8EAAB431B4C45C84245A95 /* Pods-StylableSwiftUI_Example */, - 8884E6871B0E76FB7A9F5718E9E2180A /* Pods-StylableSwiftUI_Tests */, - 0E12E449EA31D5414AB180DDBF51184C /* StylableSwiftUI */, - 52B60EC2A583F24ACBB69C113F5488B9 /* SwiftLint */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 24FB98A252B469D30476ADF620B45E36 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7FD86EF08DDF6D828837806805F79DA0 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EC1CA2849514B307E51899ECC4D77391 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F4DBBD3C92539BEE571CFE8565D366E3 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1641C70F6012AC6B16AC4F7317320694 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 43DEC4280E493C54F7A7628BC7CF7990 /* AnimatedButton.swift in Sources */, - B3A059325006971712DD4D8488A5CAAA /* AnimatedControl.swift in Sources */, - 5775E8FD990EEDEC7903B2BCBAEF98F1 /* AnimatedSwitch.swift in Sources */, - CA0C10DE94AFA993699C4236AB07E680 /* AnimationCacheProvider.swift in Sources */, - 1AC296837573B6EF3074BA288113F821 /* AnimationContext.swift in Sources */, - 7A9F577EFA781AA5B36C2FBAF0ABD1B0 /* AnimationFontProvider.swift in Sources */, - B16B052B91275A01A909B0A6AFE1B9A6 /* AnimationImageProvider.swift in Sources */, - C0003FBEF8A40420AF360F88A02E5D91 /* AnimationKeypath.swift in Sources */, - 8D00350D9735374F8C0A631A2103E2B5 /* AnimationKeypathExtension.swift in Sources */, - 146091434F9D4560BCCD633BDAFAA2A2 /* AnimationLayer.swift in Sources */, - 8121C55805F65A14548F474CB957A378 /* AnimationSubview.swift in Sources */, - 8A2389AD6F30813F23A59E5E64F62729 /* AnimationTextProvider.swift in Sources */, - 9B9E7C20A8E8BEA8298256BCBBDF6072 /* AnimationTime.swift in Sources */, - 14D2FFA3FDB2E0F79E197F38D2C98902 /* AnimatorNode.swift in Sources */, - A04AD6444D7D86346E6231A5C584E884 /* AnimatorNodeDebugging.swift in Sources */, - 5FE79F40296EF6B5FE33DE3669CD6435 /* AnyNodeProperty.swift in Sources */, - 42B296D09113E31285B1C07D3F193821 /* AnyValueContainer.swift in Sources */, - 3857C9DCBD7D4B410A2B3507ADD57330 /* AnyValueProvider.swift in Sources */, - F747D836E468BB981DD6BE19C70810B2 /* Archive.swift in Sources */, - B76BCCC746BB175B847D8036C21E5DE7 /* Archive+BackingConfiguration.swift in Sources */, - 2DA87FFE3F767E349252E51ADC5379B6 /* Archive+Helpers.swift in Sources */, - A38EE6023416B398B654465FF7B86963 /* Archive+MemoryFile.swift in Sources */, - C68D277F2BA6FF79BB5B08BCDFCE37CE /* Archive+Progress.swift in Sources */, - EEE1586E3824C8C6B698E3668BA933DF /* Archive+Reading.swift in Sources */, - 371943F29EC377DB6CBC63D859D6562E /* Archive+ReadingDeprecated.swift in Sources */, - 26F503CA9F9371AB84A7A9533866B599 /* Archive+Writing.swift in Sources */, - 090D76D78710E22FCC59FB6F1E182853 /* Archive+WritingDeprecated.swift in Sources */, - A1D5E5118986623A6A6483DBF56C6C96 /* Archive+ZIP64.swift in Sources */, - 08950E07EDC6A1E24424DE17DF80BB45 /* Asset.swift in Sources */, - 1CD9878CCFF1CC718717F77B0DE74CC3 /* AssetLibrary.swift in Sources */, - 53D3F555CE45CB0FA6AE70C1B310041C /* BaseAnimationLayer.swift in Sources */, - 6E156D9B720CEA8270D508C68EDB4376 /* BaseCompositionLayer.swift in Sources */, - C22C0BFABF078F24ECC75386AF24D93E /* BezierPath.swift in Sources */, - 0D01C7F13F5A52BF2FE0CDE94A6F6165 /* BezierPathRoundExtension.swift in Sources */, - 625AA4402F6AB533D49C2B42AD73F59F /* BlendMode+Filter.swift in Sources */, - B61720A8FF4C09FFE7E359CBE9C5ADFC /* Bundle.swift in Sources */, - 6BCDE862CC5C896043DFB88F4C1056DE /* BundleImageProvider.swift in Sources */, - E42CFC6E2B440CA4A5C4D82A69B1D777 /* CAAnimation+TimingConfiguration.swift in Sources */, - 36D6D176BA990A4D094C3E96D628506D /* CachedImageProvider.swift in Sources */, - 8DE22B4421D4A5C3998099286E3D199E /* CALayer+addAnimation.swift in Sources */, - 8614204A7D4A6498DEB0A9EE64C01E25 /* CALayer+fillBounds.swift in Sources */, - 3FCF1B417CDA4B2A2B9261BB5CAB128E /* CALayer+setupLayerHierarchy.swift in Sources */, - 4FBE9B2F5765C0A74D198B326F9FDA84 /* CGColor+RGB.swift in Sources */, - 16B2D86C809C74806A09BA41DFAC90BC /* CGFloatExtensions.swift in Sources */, - 2B51D40BB08E27B0B027FA6531462173 /* CGPointExtension.swift in Sources */, - 5889E65DF4B2C05A17907BAF8FAF514A /* ColorExtension.swift in Sources */, - 09947D686FC5D6EC6AC8A7D91A831ADE /* ColorValueProvider.swift in Sources */, - 2EE70950C8F4D0539D8E240C8A772012 /* CombinedShapeAnimation.swift in Sources */, - D58ABDABE1F203F4FB0C57496AFE6FD3 /* CompatibilityTracker.swift in Sources */, - E65754020085C5B72D9D37A866B916F9 /* CompatibleAnimationKeypath.swift in Sources */, - 2A394FCBD1DA381AC8C4CED87BB3A2EF /* CompatibleAnimationView.swift in Sources */, - 9949689A478FCA47BAA34BBC38AC4474 /* CompositionLayer.swift in Sources */, - D4F91E4AAEEAFBC8D6A48316247E13DB /* CompositionLayersInitializer.swift in Sources */, - DA44B1581DADFEF0012A20B3013D45F4 /* CompoundBezierPath.swift in Sources */, - 625F9CE86EB74426C1FF9C3523D2D10C /* CoreAnimationLayer.swift in Sources */, - 69DF936A6D86ACA1498053220BA8420F /* CoreTextRenderLayer.swift in Sources */, - 508F2DB3F3264E9AB74302ABBF92175C /* CurveVertex.swift in Sources */, - BA4111806DE27D4453C847540D86F467 /* CustomPathAnimation.swift in Sources */, - 87E0263E1159DEF3691D87141AA6D6E8 /* DashPattern.swift in Sources */, - 8656CFE42D704716F048A762CBEC5189 /* Data+Compression.swift in Sources */, - BD52AF429A51E907A9AEE6122AB28471 /* Data+CompressionDeprecated.swift in Sources */, - 432001A8B744E58A19D0A25F0A29F8E9 /* Data+Serialization.swift in Sources */, - FD4218583F31BB489276BD338711CDEA /* DataExtension.swift in Sources */, - 3A5A7E8D0EFA6BE61ECBB92C84C5250E /* DefaultAnimationCache.swift in Sources */, - A10A2A4F77FB31C08F330AFAA014E389 /* DictionaryInitializable.swift in Sources */, - 5C400981E989E63EEC2F7EB260BBDF55 /* DotLottieAnimation.swift in Sources */, - 9076AA15B82309E4608FDF1929DA5353 /* DotLottieCache.swift in Sources */, - 4A59452F1FD20D993C02AEE78B838815 /* DotLottieCacheProvider.swift in Sources */, - 7F5F1D604005F2EF8F30785301144A8D /* DotLottieConfiguration.swift in Sources */, - DC5221CB3DDCAC953149CA50B6D10AB0 /* DotLottieFile.swift in Sources */, - DBC634DFA9E992FDB99FF326987D03A9 /* DotLottieFileHelpers.swift in Sources */, - 1CA5156001688D549123A03CD604EC29 /* DotLottieImageProvider.swift in Sources */, - 2D948FDB771F5A5AA500924C97862F38 /* DotLottieManifest.swift in Sources */, - DD43651BEE467BED6AA7011AB09C2D78 /* DotLottieUtils.swift in Sources */, - 3660E77E00A3E25C3DD240ECFAE0B9BA /* Ellipse.swift in Sources */, - 53E968FBD8D97552852210C7C2DFA243 /* EllipseAnimation.swift in Sources */, - 0CA33A4686554531532350E83D86296D /* EllipseNode.swift in Sources */, - 4BAF8BA7CBF4A8E5673C287B11468CB2 /* Entry.swift in Sources */, - 1A67466B15A88B9109AF63A30A114230 /* Entry+Serialization.swift in Sources */, - 20CC8720FE3B3B84DB3703FB7822F36C /* Entry+ZIP64.swift in Sources */, - 10FD3521AD5FC225F88536AA0BB3A824 /* FileManager+ZIP.swift in Sources */, - 8D8774EDA5EA7C448FC689CB3A399119 /* FilepathImageProvider.swift in Sources */, - 3E856F516C697C80DB808A578A301555 /* Fill.swift in Sources */, - 9964DDADF0D385659C4F22A296D6BF45 /* FillNode.swift in Sources */, - 7881133228690E2573EFD4211C07464E /* FillRenderer.swift in Sources */, - 7B91E1E168A78CCBCCC9667447C3655C /* FloatValueProvider.swift in Sources */, - D0B8B5AFA87BDF7767116FB5C5A31768 /* Font.swift in Sources */, - 55903A2678A9ED5B6D0772922CC43CDE /* Glyph.swift in Sources */, - 110CFE00581EBCC12FAA1B58DF9830C4 /* GradientAnimations.swift in Sources */, - C1BF9C2332497D62B0F497C63158E17C /* GradientFill.swift in Sources */, - 23C0C453BB23FB6C7B6BAEC891F8D162 /* GradientFillNode.swift in Sources */, - B6EBB0027EB831C54D72D9BCBFF1D0F9 /* GradientFillRenderer.swift in Sources */, - 67AECFC096F0C9F416E4D7068E524C10 /* GradientRenderLayer.swift in Sources */, - F3F9500BB4AB03D5B7A728EA40B0866B /* GradientStroke.swift in Sources */, - EA7AB36D6A2889486A1D2EE80F792A89 /* GradientStrokeNode.swift in Sources */, - 6111C8B8397457F2D015A748619DD14D /* GradientStrokeRenderer.swift in Sources */, - BC3CC1712141A58F272D0AE540596A88 /* GradientValueProvider.swift in Sources */, - F3E04C2461609E4BE1D03332EE4A3974 /* Group.swift in Sources */, - C4E12530FB0BA764E8FCD61491BD846D /* GroupInterpolator.swift in Sources */, - 0C30F154BE861E1E692C73A371BB528C /* GroupNode.swift in Sources */, - EE589ED85B8808B0830912ED2EBEA467 /* GroupOutputNode.swift in Sources */, - 16E4575589BF0B2B23F635CDF7AB465C /* ImageAsset.swift in Sources */, - 722333529FA3DD8B437D491C1555C310 /* ImageCompositionLayer.swift in Sources */, - BB9CA08FAD488B95826B87AB83F26691 /* ImageLayer.swift in Sources */, - 8AFA678DF7D7102C2ED50C27D3F9D7D0 /* ImageLayerModel.swift in Sources */, - 6BB97E3304586A85D51FEEDBCC3C9BE8 /* InfiniteOpaqueAnimationLayer.swift in Sources */, - 24151A81BB69793755117954FCF5C800 /* Interpolatable.swift in Sources */, - 2B86F47B3AF6AF0927B831BC9628F6A0 /* InterpolatableExtensions.swift in Sources */, - 589C68C8879BA0F8FE093228BA0331A5 /* InvertedMatteLayer.swift in Sources */, - B1832097BA1983FF1F9E2DCED898A634 /* ItemsExtension.swift in Sources */, - 5806B72F22638A6008231EA9EF1C91E3 /* KeyedDecodingContainerExtensions.swift in Sources */, - DB386459ED71A5E888933DF75EB8148F /* Keyframe.swift in Sources */, - 4023ADC9F4CD4A4074D2BC2918BB8308 /* KeyframeData.swift in Sources */, - 367BD2746586FD565E5C31FB06AC342F /* KeyframeExtensions.swift in Sources */, - D3B5D4EAB569869A3AF43FBC4E899C2C /* KeyframeGroup.swift in Sources */, - 2B079B8AE100F49358AC476593D5C51A /* KeyframeGroup+exactlyOneKeyframe.swift in Sources */, - 9642DA659160713E3513C181333BA0B7 /* KeyframeInterpolator.swift in Sources */, - BD290E2F581402F89EA7D97F860992F1 /* Keyframes+combined.swift in Sources */, - 483D3AF312BDB4D0C92E725EE937094A /* KeypathSearchable.swift in Sources */, - 5BBF4D92127617EC39FB20C4895D010B /* LayerDebugging.swift in Sources */, - F2F035BA9321DFF9370E0136CC21E319 /* LayerFontProvider.swift in Sources */, - 7376FE441B8895961823C0FD9B0E49F1 /* LayerImageProvider.swift in Sources */, - 6E952D2C7BA8DC6C628F32B6F34CE5DB /* LayerModel.swift in Sources */, - 535F6586DBD712AAF0F66DD959A77132 /* LayerModel+makeAnimationLayer.swift in Sources */, - B5648CF2FB87777347161ED865396EAA /* LayerProperty.swift in Sources */, - 2485276A507C2902C986CA3B2FBA51A0 /* LayerTextProvider.swift in Sources */, - 23EA0BAD9F4576488308486EF1EE68CD /* LayerTransformNode.swift in Sources */, - 5465DE810317F4CCB5EB410E552CBF1C /* LegacyGradientFillRenderer.swift in Sources */, - 2C5E4C32B7A7D3871C8C63811FFFA8AD /* lottie-ios-dummy.m in Sources */, - 534169A16DA9E1DA272A7A1F60FB4D66 /* LottieAnimation.swift in Sources */, - 02D01ECCCD825E0B74B86AE0921A3CEC /* LottieAnimationCache.swift in Sources */, - 9A4C7433D93EC6D44BE371E551E7BDAD /* LottieAnimationHelpers.swift in Sources */, - 6546CAAD7AB2027E0B5FECF70C8D0068 /* LottieAnimationView.swift in Sources */, - 03B6BE2C793965ED36A9778F1315CF7D /* LottieAnimationViewBase.swift in Sources */, - 5AEA51E02EAA5598B98A93FA7C9BA041 /* LottieAnimationViewInitializers.swift in Sources */, - 0AA357BAABE086DC675CA83F909651F4 /* LottieColor.swift in Sources */, - 9E8A543201F024278789076AC82B4F73 /* LottieConfiguration.swift in Sources */, - 23C9BC23FFDD34088E2ACF0A07169233 /* LottieLogger.swift in Sources */, - 7B01DBEB89B820C8294341814A332BCF /* LRUAnimationCache.swift in Sources */, - EA3AEBE6FAA281C6D78D0E6F00C119D6 /* MainThreadAnimationLayer.swift in Sources */, - 840684F95FFA8EC3852803F0598B253D /* Marker.swift in Sources */, - 99F4EF37E1BC5796C68137544C0ED64B /* Mask.swift in Sources */, - E4C0ED615790D52086D805D92D65D578 /* MaskCompositionLayer.swift in Sources */, - 77F17C92762938C79E540DDEBDA49689 /* MaskContainerLayer.swift in Sources */, - 141507E0816A2DF85CEFB13D53753FCD /* MathKit.swift in Sources */, - 95AC7563BA942A1CE56FCD8C883B7AE2 /* Merge.swift in Sources */, - 1C8FAD5B328D9D3693FA9E93AEA7F4EF /* NodeProperty.swift in Sources */, - CBC041697CBBEE35DC71A7A8B9916ECC /* NodePropertyMap.swift in Sources */, - C5DA44D2AD47D4FA4511B7B1AF7AED88 /* NullCompositionLayer.swift in Sources */, - A97341A6F9B8E9C34B21769E54A71439 /* OpacityAnimation.swift in Sources */, - 08AD790AE1BC781B669D2C3C8153F00B /* PassThroughOutputNode.swift in Sources */, - 4D5D7F668A018FBBED4585E30B4DE6E8 /* PathElement.swift in Sources */, - E4721018025B8F6B83CF7242FA72B99A /* PathNode.swift in Sources */, - 16DE331A244871168384A865F307C4C4 /* PathOutputNode.swift in Sources */, - 40C943C891FB76641DC4F5706D228930 /* PointValueProvider.swift in Sources */, - 26D06F9703728B8F083F1D7FB9FB1E28 /* PolygonNode.swift in Sources */, - 6D227B67A3DF9BA7EFE03D6C927D971E /* PrecompAsset.swift in Sources */, - 47AE0FD3ACB6E1B81D0BF3DB95ED55AA /* PreCompLayer.swift in Sources */, - B7F0B48511A69BC230586A3247FCA836 /* PreCompLayerModel.swift in Sources */, - 3DB4CE08417D765D38EB14DF6B533DD8 /* PreCompositionLayer.swift in Sources */, - E4FDBA4308929CE1E6CFA9E6F11BD3CA /* README.md in Sources */, - B2D44E48C25D4B340B970422BBDDA99D /* Rectangle.swift in Sources */, - 44995988E971B6981F6F42BF6A27242B /* RectangleAnimation.swift in Sources */, - 7379636F79F9B22014359FB1EFC7922C /* RectNode.swift in Sources */, - 64CC8EF0FF2DE9F351FE889D2F02E38C /* RenderNode.swift in Sources */, - 55A4E5D7362F024C87F18E3AFDF929BC /* Repeater.swift in Sources */, - 7D4323BE6C60CF056FFE08510F65A380 /* RepeaterLayer.swift in Sources */, - 94114F5B974267BDF7076195A490B967 /* RootAnimationLayer.swift in Sources */, - 1BAD3EBB68E8C433438EB240A79BB77A /* RoundedCorners.swift in Sources */, - E1D7A115FDD929774F75DFAEBD29E6FB /* RoundedCornersNode.swift in Sources */, - 270FCE2492A27DF6A080D0B2FC5AF8B4 /* Shape.swift in Sources */, - FC1892FCE15696BB46D9D2690519A864 /* ShapeAnimation.swift in Sources */, - 86C74D352D37F3AFD2D88AAF50A3CC4B /* ShapeCompositionLayer.swift in Sources */, - C0237F8B8862B6DC3D70E0A9DEFE756A /* ShapeContainerLayer.swift in Sources */, - C12518EE64CCC5D4AC726296E6D34D4B /* ShapeItem.swift in Sources */, - 03E8748B25EF08DE80D6C077424C0E95 /* ShapeItemLayer.swift in Sources */, - 1629D2507FAEF3A958EDB1E92CABC962 /* ShapeLayer.swift in Sources */, - F5E397625A03E580140AE227445B7EDF /* ShapeLayerModel.swift in Sources */, - 750B13EFC7C833999CD772476EBF2DBC /* ShapeNode.swift in Sources */, - 24826A2FFABFCE32EC398DB906CACAF4 /* ShapeRenderLayer.swift in Sources */, - 8E3D520C78F4412C1594505C98CFD0C5 /* ShapeTransform.swift in Sources */, - DFF482F708315605FC9B0C6439A5226D /* SingleValueProvider.swift in Sources */, - 1AF57C7A60AE67FED41A323CA02EFA0E /* SizeValueProvider.swift in Sources */, - C82D294B82E15322EF3B72FC4DC0D0E8 /* SolidCompositionLayer.swift in Sources */, - 8EB6C9CA30077FB24AE5FED86A3A31FE /* SolidLayer.swift in Sources */, - 1D7C4855617FC2915151651804D940DB /* SolidLayerModel.swift in Sources */, - 39BF8DFF46375887445074B297CA9D38 /* Star.swift in Sources */, - A21B35A8A317F1B7FF609A994AE180F9 /* StarAnimation.swift in Sources */, - 4EF3446BBB59F042304456AF4B3674BA /* StarNode.swift in Sources */, - 9B7B3497788D9A92581876D75ECE1DA3 /* StringExtensions.swift in Sources */, - C05CA409345C737BAF34E834D56E80F0 /* Stroke.swift in Sources */, - D947A926D254D8B4AB211B05EE62C1BE /* StrokeAnimation.swift in Sources */, - BCD281910F76A2C53503FAC5CBAB2FC0 /* StrokeNode.swift in Sources */, - 7D4CEDF5C98CABE00BBE56682430D059 /* StrokeRenderer.swift in Sources */, - 8FFA39383D878AF4472577EF44C25FDE /* TestHelpers.swift in Sources */, - C1889B8FED88E4231AA9E11F081C1106 /* TextAnimator.swift in Sources */, - 7C5FB48D1BEF0E601DF4DE72F8976F35 /* TextAnimatorNode.swift in Sources */, - B27184DC7A405A45E24AFC80737AFF67 /* TextCompositionLayer.swift in Sources */, - 4F220F69C8FEA7B4FD6D16C5F786FD9A /* TextDocument.swift in Sources */, - 0BE2B958696379FA94E4A358D8988160 /* TextLayer.swift in Sources */, - D387B1C2B353118D1FF2EDA0F9A077AF /* TextLayerModel.swift in Sources */, - 5A35A33E39F5CC0D6DCDF3F5B28C589A /* Transform.swift in Sources */, - 8711C977E08F368C943541506747AA7A /* TransformAnimations.swift in Sources */, - 30DC1322A4EF8167FC73A0FB75AD1C8A /* TransformLayer.swift in Sources */, - 509E81FB8300B03C869CC7E0E04FC623 /* Trim.swift in Sources */, - C08C9E0B445FBF78E8FB44F25AC13D60 /* TrimPathNode.swift in Sources */, - 616AF83AD79BFD3833BD336E2DD34004 /* UIColorExtension.swift in Sources */, - C98948D2CC01DB1FEC3A7753267641BA /* UnitBezier.swift in Sources */, - 99902AF25053BA8B6968D7E849384B0C /* URL+ZIP.swift in Sources */, - BC0EA9F64C93C4074B3244891C743676 /* ValueContainer.swift in Sources */, - 873BFE8BADAB75F139E9D3A592F514F8 /* ValueProviderStore.swift in Sources */, - 874CB6A69C8794A2536C2915185E8723 /* Vectors.swift in Sources */, - B279C3295A3607E744EE1F2EE68A3A68 /* VectorsExtensions.swift in Sources */, - B90BD1E00D6438D2897D4D3B5898C0C8 /* VisibilityAnimation.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 37695BB7555E74BD502CDEF0A1769268 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8145F62740E671D1334E7984E1860769 /* Pods-StylableSwiftUI_Example-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 68DAD72C00561773E0E44C68601C2E1B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2C9F4C5AB9896037313D097054ACE182 /* AnimatedView.swift in Sources */, - FF816B55340408B32032B6DBAFE3031E /* DebugStylist.swift in Sources */, - E6AFE4E1B6086E598524B4D6491AA41D /* ImageCache.swift in Sources */, - 5BB0A27F06C0597D7C371991C7EB4F36 /* ImageCacheKey.swift in Sources */, - F8FB7AF7E8654F1F80DD92E2840E1245 /* Logger.swift in Sources */, - 5A4C9C20AFADB3E56ED6B095DE9BF10B /* StylableAnimatedView.swift in Sources */, - 43130465ADA5D107A83EF8632199A16E /* StylableGroup.swift in Sources */, - E858157E7C8756C41F490EAFE12EAE28 /* StylableImage.swift in Sources */, - 66DEE8AA32FD358FF8CFF7B0AB9CC4F2 /* StylableSwiftUI-dummy.m in Sources */, - 79E4CF79E12322F10175CB2E4428B4CF /* StylableView.swift in Sources */, - BAC62B9182624B830A3AD4E46AC0ED3A /* Stylist.swift in Sources */, - 9D5F25BB77943AC1C0A9C637C3B3EAE1 /* Stylist+UIKit.swift in Sources */, - 9CCEA3D2115AA5C83B0555760B654505 /* StylistIdentifier.swift in Sources */, - A57AB82BA3A0E5EE8D90ED92D9DDB785 /* StylistIdentifierMatcher.swift in Sources */, - 7314F2B3C7644910A77DEEEDB5AC2950 /* Theme.swift in Sources */, - 5D930C4A3DEB081B9B9B63484E637442 /* ThemedStylistIdentifier.swift in Sources */, - 402C14041C16867B0C53EBF05DBB4D68 /* UIKitStyleContainer.swift in Sources */, - D628D3072FF4E070A1FDB299C245CC08 /* View+style.swift in Sources */, - 69ADFBED3E53E133A70CBCADDFC66444 /* WithStyleIdentifier.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6A6D75081DE78E2805E0349CDD22E50F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - C59FDC72D2A7E3B7CE843A9A8791D806 /* Pods-StylableSwiftUI_Tests-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 4B16A20EC57525B1DB170DA802326216 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = StylableSwiftUI; - target = 0E12E449EA31D5414AB180DDBF51184C /* StylableSwiftUI */; - targetProxy = A0235DBC95A4BDD93847B87096984A60 /* PBXContainerItemProxy */; - }; - 6B57A080C37F50263A4610F70DEBE81E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "lottie-ios"; - target = 0B967D7F8561D42493EE289EC8D450D1 /* lottie-ios */; - targetProxy = 06A78FC91786C0D3471F25CBDEC40B77 /* PBXContainerItemProxy */; - }; - 886EEA27D1E23872070AC71AFAEED931 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "lottie-ios"; - target = 0B967D7F8561D42493EE289EC8D450D1 /* lottie-ios */; - targetProxy = E1B536702B9778EDE2C57A05D7C5B1AB /* PBXContainerItemProxy */; - }; - 8F689E0C3558F08BBFE46EDB52FE03F7 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = SwiftLint; - target = 52B60EC2A583F24ACBB69C113F5488B9 /* SwiftLint */; - targetProxy = D56D7259A36CE0C602555E3E9EC41900 /* PBXContainerItemProxy */; - }; - BB3E3BB73E4FE8BBA45647E47A8E24CF /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "Pods-StylableSwiftUI_Example"; - target = 4E0384231A8EAAB431B4C45C84245A95 /* Pods-StylableSwiftUI_Example */; - targetProxy = C35675B6BB369620F8CD505FE7AC22BD /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1DD1866006AF0578589E0EECD68A2EDD /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5B99811236455523692133D709217227 /* Pods-StylableSwiftUI_Tests.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 26EA5A9600226D2B7D8D25152A304F3B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7F74452BACAF1FB9091AB0D2E30C07DC /* SwiftLint.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CLANG_ENABLE_OBJC_WEAK = NO; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 2A32C6930A829A05FEA6B5999DAC3100 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 0D933AB707E8940C3512A2FA69316DB6 /* StylableSwiftUI.debug.xcconfig */; - buildSettings = { - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/StylableSwiftUI/StylableSwiftUI-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/StylableSwiftUI/StylableSwiftUI-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MODULEMAP_FILE = "Target Support Files/StylableSwiftUI/StylableSwiftUI.modulemap"; - PRODUCT_MODULE_NAME = StylableSwiftUI; - PRODUCT_NAME = StylableSwiftUI; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.8; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 2E40B7F475C47D0D4D96D6EF705D8A99 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 2E3034F755162A44193D114320F95627 /* Pods-StylableSwiftUI_Example.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 4BC7450F9457737EE3E637BA155B56F7 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - 595B7B3E903C7B1C59E0BD1FF60F7D3C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 30AFE4E822B18CEC1E51FF698D5012BF /* Pods-StylableSwiftUI_Example.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 5C99B33C63D06D543843EF30FD057158 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E06DDD418B7962A6CC197317DB833F52 /* lottie-ios.release.xcconfig */; - buildSettings = { - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/lottie-ios/lottie-ios-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/lottie-ios/lottie-ios-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MODULEMAP_FILE = "Target Support Files/lottie-ios/lottie-ios.modulemap"; - PRODUCT_MODULE_NAME = Lottie; - PRODUCT_NAME = Lottie; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.5; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 8B5A46FF8D3C1289CDEE3BAFACABCD2A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 5.0; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Release; - }; - B1A177CA07960702A35DA88A95720C46 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 78F2AA43F8A96E13884C58D413820334 /* Pods-StylableSwiftUI_Tests.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - B59BD6CDCCF43A9E8A5E3489CED8DD5E /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B5CABB5EAB4761542524EEC781C39019 /* StylableSwiftUI.release.xcconfig */; - buildSettings = { - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/StylableSwiftUI/StylableSwiftUI-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/StylableSwiftUI/StylableSwiftUI-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MODULEMAP_FILE = "Target Support Files/StylableSwiftUI/StylableSwiftUI.modulemap"; - PRODUCT_MODULE_NAME = StylableSwiftUI; - PRODUCT_NAME = StylableSwiftUI; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.8; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - CCAE9B07A4943A9017EE8520F241E68A /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4C7171FDB662E6F5148D15E2C59AE613 /* lottie-ios.debug.xcconfig */; - buildSettings = { - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/lottie-ios/lottie-ios-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/lottie-ios/lottie-ios-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MODULEMAP_FILE = "Target Support Files/lottie-ios/lottie-ios.modulemap"; - PRODUCT_MODULE_NAME = Lottie; - PRODUCT_NAME = Lottie; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.5; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - E9E1A48A750B946DE9877594C6E735E4 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E830B2AF26F057D839F8407913F2593D /* SwiftLint.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CLANG_ENABLE_OBJC_WEAK = NO; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4BC7450F9457737EE3E637BA155B56F7 /* Debug */, - 8B5A46FF8D3C1289CDEE3BAFACABCD2A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4E3073930B38750F0C9DCCE9D9F698B2 /* Build configuration list for PBXNativeTarget "lottie-ios" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CCAE9B07A4943A9017EE8520F241E68A /* Debug */, - 5C99B33C63D06D543843EF30FD057158 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 53568C37E0FB983A1DE554AEF654BC86 /* Build configuration list for PBXNativeTarget "Pods-StylableSwiftUI_Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 595B7B3E903C7B1C59E0BD1FF60F7D3C /* Debug */, - 2E40B7F475C47D0D4D96D6EF705D8A99 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - AE7B4FB01588B9E6DF09CB79FC7CE7BD /* Build configuration list for PBXAggregateTarget "SwiftLint" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E9E1A48A750B946DE9877594C6E735E4 /* Debug */, - 26EA5A9600226D2B7D8D25152A304F3B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C936A24EA13B05C208D25AC648E655DF /* Build configuration list for PBXNativeTarget "Pods-StylableSwiftUI_Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DD1866006AF0578589E0EECD68A2EDD /* Debug */, - B1A177CA07960702A35DA88A95720C46 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - F14C9A969EA3717E74695D39C7646766 /* Build configuration list for PBXNativeTarget "StylableSwiftUI" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2A32C6930A829A05FEA6B5999DAC3100 /* Debug */, - B59BD6CDCCF43A9E8A5E3489CED8DD5E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; -} diff --git a/Example/Pods/SwiftLint/LICENSE b/Example/Pods/SwiftLint/LICENSE deleted file mode 100644 index 0420376..0000000 --- a/Example/Pods/SwiftLint/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Realm Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Example/Pods/SwiftLint/swiftlint b/Example/Pods/SwiftLint/swiftlint deleted file mode 100755 index 0f1e2fd..0000000 Binary files a/Example/Pods/SwiftLint/swiftlint and /dev/null differ diff --git a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-Info.plist b/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-Info.plist deleted file mode 100644 index 19cf209..0000000 --- a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - ${PODS_DEVELOPMENT_LANGUAGE} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-acknowledgements.markdown deleted file mode 100644 index 350f116..0000000 --- a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-acknowledgements.markdown +++ /dev/null @@ -1,256 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## StylableSwiftUI - -Copyright (c) 2020 deanWombourne - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -## SwiftLint - -The MIT License (MIT) - -Copyright (c) 2020 Realm Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -## lottie-ios - - Apache License - Version 2.0, January 2004 - https://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2018 Airbnb, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -Generated by CocoaPods - https://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-acknowledgements.plist deleted file mode 100644 index 9911d33..0000000 --- a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-acknowledgements.plist +++ /dev/null @@ -1,300 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2020 deanWombourne <deanWombourne@gmail.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - License - MIT - Title - StylableSwiftUI - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2020 Realm Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - License - MIT - Title - SwiftLint - Type - PSGroupSpecifier - - - FooterText - Apache License - Version 2.0, January 2004 - https://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2018 Airbnb, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - License - Apache - Title - lottie-ios - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-dummy.m b/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-dummy.m deleted file mode 100644 index 79bb840..0000000 --- a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_StylableSwiftUI_Example : NSObject -@end -@implementation PodsDummy_Pods_StylableSwiftUI_Example -@end diff --git a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-frameworks.sh b/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-frameworks.sh deleted file mode 100755 index 0aa4d7d..0000000 --- a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-frameworks.sh +++ /dev/null @@ -1,188 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -function on_error { - echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" -} -trap 'on_error $LINENO' ERR - -if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then - # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy - # frameworks to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" -BCSYMBOLMAP_DIR="BCSymbolMaps" - - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -# Copies and strips a vendored framework -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink -f "${source}")" - fi - - if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then - # Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied - find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do - echo "Installing $f" - install_bcsymbolmap "$f" "$destination" - rm "$f" - done - rmdir "${source}/${BCSYMBOLMAP_DIR}" - fi - - # Use filter instead of exclude so missing patterns don't throw errors. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - elif [ -L "${binary}" ]; then - echo "Destination binary is symlinked..." - dirname="$(dirname "${binary}")" - binary="${dirname}/$(readlink "${binary}")" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} -# Copies and strips a vendored dSYM -install_dsym() { - local source="$1" - warn_missing_arch=${2:-true} - if [ -r "$source" ]; then - # Copy the dSYM into the targets temp dir. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" - - local basename - basename="$(basename -s .dSYM "$source")" - binary_name="$(ls "$source/Contents/Resources/DWARF")" - binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" - - # Strip invalid architectures from the dSYM. - if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then - strip_invalid_archs "$binary" "$warn_missing_arch" - fi - if [[ $STRIP_BINARY_RETVAL == 0 ]]; then - # Move the stripped file into its final destination. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}" - else - # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. - mkdir -p "${DWARF_DSYM_FOLDER_PATH}" - touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" - fi - fi -} - -# Used as a return value for each invocation of `strip_invalid_archs` function. -STRIP_BINARY_RETVAL=0 - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - warn_missing_arch=${2:-true} - # Get architectures for current target binary - binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" - # Intersect them with the architectures we are building for - intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" - # If there are no archs supported by this binary then warn the user - if [[ -z "$intersected_archs" ]]; then - if [[ "$warn_missing_arch" == "true" ]]; then - echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." - fi - STRIP_BINARY_RETVAL=1 - return - fi - stripped="" - for arch in $binary_archs; do - if ! [[ "${ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi - STRIP_BINARY_RETVAL=0 -} - -# Copies the bcsymbolmap files of a vendored framework -install_bcsymbolmap() { - local bcsymbolmap_path="$1" - local destination="${BUILT_PRODUCTS_DIR}" - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identity - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" - - if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - code_sign_cmd="$code_sign_cmd &" - fi - echo "$code_sign_cmd" - eval "$code_sign_cmd" - fi -} - -if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/StylableSwiftUI/StylableSwiftUI.framework" - install_framework "${BUILT_PRODUCTS_DIR}/lottie-ios/Lottie.framework" -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/StylableSwiftUI/StylableSwiftUI.framework" - install_framework "${BUILT_PRODUCTS_DIR}/lottie-ios/Lottie.framework" -fi -if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - wait -fi diff --git a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-umbrella.h b/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-umbrella.h deleted file mode 100644 index e7a108c..0000000 --- a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_StylableSwiftUI_ExampleVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_StylableSwiftUI_ExampleVersionString[]; - diff --git a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example.debug.xcconfig deleted file mode 100644 index 11ee4ec..0000000 --- a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example.debug.xcconfig +++ /dev/null @@ -1,15 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/StylableSwiftUI" "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/StylableSwiftUI/StylableSwiftUI.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios/Lottie.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -framework "CoreGraphics" -framework "Lottie" -framework "QuartzCore" -framework "StylableSwiftUI" -framework "UIKit" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example.modulemap b/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example.modulemap deleted file mode 100644 index acde7b0..0000000 --- a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_StylableSwiftUI_Example { - umbrella header "Pods-StylableSwiftUI_Example-umbrella.h" - - export * - module * { export * } -} diff --git a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example.release.xcconfig deleted file mode 100644 index 11ee4ec..0000000 --- a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example.release.xcconfig +++ /dev/null @@ -1,15 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/StylableSwiftUI" "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/StylableSwiftUI/StylableSwiftUI.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios/Lottie.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -framework "CoreGraphics" -framework "Lottie" -framework "QuartzCore" -framework "StylableSwiftUI" -framework "UIKit" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests-Info.plist b/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests-Info.plist deleted file mode 100644 index 19cf209..0000000 --- a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - ${PODS_DEVELOPMENT_LANGUAGE} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests-acknowledgements.markdown deleted file mode 100644 index 102af75..0000000 --- a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests-acknowledgements.markdown +++ /dev/null @@ -1,3 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: -Generated by CocoaPods - https://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests-acknowledgements.plist deleted file mode 100644 index 7acbad1..0000000 --- a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests-acknowledgements.plist +++ /dev/null @@ -1,29 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests-dummy.m b/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests-dummy.m deleted file mode 100644 index a477546..0000000 --- a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_StylableSwiftUI_Tests : NSObject -@end -@implementation PodsDummy_Pods_StylableSwiftUI_Tests -@end diff --git a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests-umbrella.h b/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests-umbrella.h deleted file mode 100644 index 5df43a8..0000000 --- a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_StylableSwiftUI_TestsVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_StylableSwiftUI_TestsVersionString[]; - diff --git a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests.debug.xcconfig b/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests.debug.xcconfig deleted file mode 100644 index fc6e3ed..0000000 --- a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests.debug.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/StylableSwiftUI" "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/StylableSwiftUI/StylableSwiftUI.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios/Lottie.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "CoreGraphics" -framework "Lottie" -framework "QuartzCore" -framework "StylableSwiftUI" -framework "UIKit" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests.modulemap b/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests.modulemap deleted file mode 100644 index 034fdc5..0000000 --- a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_StylableSwiftUI_Tests { - umbrella header "Pods-StylableSwiftUI_Tests-umbrella.h" - - export * - module * { export * } -} diff --git a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests.release.xcconfig b/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests.release.xcconfig deleted file mode 100644 index fc6e3ed..0000000 --- a/Example/Pods/Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests.release.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/StylableSwiftUI" "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/StylableSwiftUI/StylableSwiftUI.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios/Lottie.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "CoreGraphics" -framework "Lottie" -framework "QuartzCore" -framework "StylableSwiftUI" -framework "UIKit" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI-Info.plist b/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI-Info.plist deleted file mode 100644 index c10e1fb..0000000 --- a/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - ${PODS_DEVELOPMENT_LANGUAGE} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 3.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI-dummy.m b/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI-dummy.m deleted file mode 100644 index bc47b9c..0000000 --- a/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_StylableSwiftUI : NSObject -@end -@implementation PodsDummy_StylableSwiftUI -@end diff --git a/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI-prefix.pch b/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI-prefix.pch deleted file mode 100644 index beb2a24..0000000 --- a/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI-umbrella.h b/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI-umbrella.h deleted file mode 100644 index 52dd48e..0000000 --- a/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double StylableSwiftUIVersionNumber; -FOUNDATION_EXPORT const unsigned char StylableSwiftUIVersionString[]; - diff --git a/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI.debug.xcconfig b/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI.debug.xcconfig deleted file mode 100644 index 121b77a..0000000 --- a/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI.debug.xcconfig +++ /dev/null @@ -1,16 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/StylableSwiftUI -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -framework "CoreGraphics" -framework "Lottie" -framework "QuartzCore" -framework "UIKit" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI.modulemap b/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI.modulemap deleted file mode 100644 index dd68741..0000000 --- a/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module StylableSwiftUI { - umbrella header "StylableSwiftUI-umbrella.h" - - export * - module * { export * } -} diff --git a/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI.release.xcconfig b/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI.release.xcconfig deleted file mode 100644 index 121b77a..0000000 --- a/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI.release.xcconfig +++ /dev/null @@ -1,16 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/StylableSwiftUI -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -framework "CoreGraphics" -framework "Lottie" -framework "QuartzCore" -framework "UIKit" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI.xcconfig b/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI.xcconfig deleted file mode 100644 index 4d4f569..0000000 --- a/Example/Pods/Target Support Files/StylableSwiftUI/StylableSwiftUI.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/StylableSwiftUI -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/SwiftLint/SwiftLint.debug.xcconfig b/Example/Pods/Target Support Files/SwiftLint/SwiftLint.debug.xcconfig deleted file mode 100644 index 5238df5..0000000 --- a/Example/Pods/Target Support Files/SwiftLint/SwiftLint.debug.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftLint -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftLint -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/SwiftLint/SwiftLint.release.xcconfig b/Example/Pods/Target Support Files/SwiftLint/SwiftLint.release.xcconfig deleted file mode 100644 index 5238df5..0000000 --- a/Example/Pods/Target Support Files/SwiftLint/SwiftLint.release.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftLint -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftLint -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/lottie-ios/lottie-ios-Info.plist b/Example/Pods/Target Support Files/lottie-ios/lottie-ios-Info.plist deleted file mode 100644 index 0ea6281..0000000 --- a/Example/Pods/Target Support Files/lottie-ios/lottie-ios-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - ${PODS_DEVELOPMENT_LANGUAGE} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 4.2.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Example/Pods/Target Support Files/lottie-ios/lottie-ios-dummy.m b/Example/Pods/Target Support Files/lottie-ios/lottie-ios-dummy.m deleted file mode 100644 index 67e66c9..0000000 --- a/Example/Pods/Target Support Files/lottie-ios/lottie-ios-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_lottie_ios : NSObject -@end -@implementation PodsDummy_lottie_ios -@end diff --git a/Example/Pods/Target Support Files/lottie-ios/lottie-ios-prefix.pch b/Example/Pods/Target Support Files/lottie-ios/lottie-ios-prefix.pch deleted file mode 100644 index beb2a24..0000000 --- a/Example/Pods/Target Support Files/lottie-ios/lottie-ios-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Example/Pods/Target Support Files/lottie-ios/lottie-ios-umbrella.h b/Example/Pods/Target Support Files/lottie-ios/lottie-ios-umbrella.h deleted file mode 100644 index 287f9db..0000000 --- a/Example/Pods/Target Support Files/lottie-ios/lottie-ios-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double LottieVersionNumber; -FOUNDATION_EXPORT const unsigned char LottieVersionString[]; - diff --git a/Example/Pods/Target Support Files/lottie-ios/lottie-ios.debug.xcconfig b/Example/Pods/Target Support Files/lottie-ios/lottie-ios.debug.xcconfig deleted file mode 100644 index 5ee331f..0000000 --- a/Example/Pods/Target Support Files/lottie-ios/lottie-ios.debug.xcconfig +++ /dev/null @@ -1,15 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -framework "CoreGraphics" -framework "QuartzCore" -framework "UIKit" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/lottie-ios -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/lottie-ios/lottie-ios.modulemap b/Example/Pods/Target Support Files/lottie-ios/lottie-ios.modulemap deleted file mode 100644 index 494806f..0000000 --- a/Example/Pods/Target Support Files/lottie-ios/lottie-ios.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Lottie { - umbrella header "lottie-ios-umbrella.h" - - export * - module * { export * } -} diff --git a/Example/Pods/Target Support Files/lottie-ios/lottie-ios.release.xcconfig b/Example/Pods/Target Support Files/lottie-ios/lottie-ios.release.xcconfig deleted file mode 100644 index 5ee331f..0000000 --- a/Example/Pods/Target Support Files/lottie-ios/lottie-ios.release.xcconfig +++ /dev/null @@ -1,15 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -framework "CoreGraphics" -framework "QuartzCore" -framework "UIKit" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/lottie-ios -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/lottie-ios/LICENSE b/Example/Pods/lottie-ios/LICENSE deleted file mode 100644 index 55bb178..0000000 --- a/Example/Pods/lottie-ios/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - https://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2018 Airbnb, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Example/Pods/lottie-ios/README.md b/Example/Pods/lottie-ios/README.md deleted file mode 100644 index 0bfef56..0000000 --- a/Example/Pods/lottie-ios/README.md +++ /dev/null @@ -1,107 +0,0 @@ -# Lottie for iOS - [![Version](https://img.shields.io/cocoapods/v/lottie-ios.svg?style=flat)](https://cocoapods.org/pods/lottie-ios) [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![SwiftPM](https://img.shields.io/badge/SPM-supported-DE5C43.svg?style=flat)](https://swift.org/package-manager/) [![License](https://img.shields.io/cocoapods/l/lottie-ios.svg?style=flat)](https://cocoapods.org/pods/lottie-ios) [![Platform](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fairbnb%2Flottie-ios%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/airbnb/lottie-ios) [![Swift Versions](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fairbnb%2Flottie-ios%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/airbnb/lottie-ios) - -**View documentation, FAQ, help, examples, and more at [airbnb.io/lottie](https://airbnb.io/lottie/)** - -Lottie is a cross-platform library for iOS, macOS, tvOS, [Android](https://github.com/airbnb/lottie-android), and [Web](https://github.com/airbnb/lottie-web) that natively renders vector-based animations and art in realtime with minimal code. - -Lottie loads and renders animations and vectors exported in the bodymovin JSON format. Bodymovin JSON can be created and exported from After Effects with [bodymovin](https://github.com/bodymovin/bodymovin), Sketch with [Lottie Sketch Export](https://github.com/buba447/Lottie-Sketch-Export), and from [Haiku](https://www.haiku.ai). - -Designers can create **and ship** beautiful animations without an engineer painstakingly recreating them by hand. -Since the animations are backed by JSON, they are extremely small in size but can be large in complexity! -Animations can be played, resized, looped, sped up, slowed down, reversed, and even interactively scrubbed. -Lottie can play or loop just a portion of the animation as well, the possibilities are endless! -Animations can even be ***changed at runtime*** in various ways! Change the color, position, or any keyframable value! - -Here is just a small sampling of the power of Lottie - -![Example1](_Gifs/Examples1.gif) -![Example2](_Gifs/Examples2.gif) - - - -![Example3](_Gifs/Examples3.gif) - -![Abcs](_Gifs/Examples4.gif) - -## Installing Lottie -Lottie supports [Swift Package Manager](https://www.swift.org/package-manager/), [CocoaPods](https://cocoapods.org/), and [Carthage](https://github.com/Carthage/Carthage) (Both dynamic and static). - -### Github Repo - -You can pull the [Lottie Github Repo](https://github.com/airbnb/lottie-ios/) and include the `Lottie.xcodeproj` to build a dynamic or static library. - -### Swift Package Manager - -To install Lottie using [Swift Package Manager](https://github.com/apple/swift-package-manager) you can follow the [tutorial published by Apple](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app) using the URL for the Lottie repo with the current version: - -1. In Xcode, select “File” → “Add Packages...” -1. Enter https://github.com/airbnb/lottie-spm.git - -or you can add the following dependency to your `Package.swift`: - -```swift -.package(url: "https://github.com/airbnb/lottie-spm.git", from: "4.2.0") -``` - -When using Swift Package Manager we recommend using the [lottie-spm](https://github.com/airbnb/lottie-spm) repo instead of the main lottie-ios repo. The main git repository for [lottie-ios](https://github.com/airbnb/lottie-ios) is somewhat large (300+ MB), and Swift Package Manager always downloads the full repository with all git history. The [lottie-spm](https://github.com/airbnb/lottie-spm) repo is much smaller (less than 500kb), so can be downloaded much more quickly. - -Instead of downloading the full git history of Lottie and building it from source, the lottie-spm repo just contains a pointer to the precompiled XCFramework included in the [latest lottie-ios release](https://github.com/airbnb/lottie-ios/releases/latest) (typically ~8MB). If you prefer to include Lottie source directly your project, you can directly depend on the main lottie-ios repo by referencing `https://github.com/airbnb/lottie-ios.git` instead. - -### CocoaPods -Add the pod to your Podfile: -```ruby -pod 'lottie-ios' -``` - -And then run: -```ruby -pod install -``` -After installing the cocoapod into your project import Lottie with -```swift -import Lottie -``` - -### Carthage -Add Lottie to your Cartfile: -``` -github "airbnb/lottie-ios" "master" -``` - -And then run: -``` -carthage update -``` -In your application targets “General” tab under the “Linked Frameworks and Libraries” section, drag and drop lottie-ios.framework from the Carthage/Build/iOS directory that `carthage update` produced. - -### Data collection - -The Lottie SDK does not collect any data. We provide this notice to help you fill out [App Privacy Details](https://developer.apple.com/app-store/app-privacy-details/). - -## Contributing - -We always appreciate contributions from the community. To make changes to the project, you can clone the repo and open `Lottie.xcworkspace`. This workspace includes: - - the Lottie framework (for iOS, macOS, and tvOS) - - unit tests and snapshot tests (for iOS, must be run on an iPhone 8 simulator) - - an Example iOS app that lets you browse and test over 100 sample animations included in the repo - -All pull requests with new features or bug fixes that affect how animations render should include snapshot test cases that validate the included changes. - - To add a new sample animation to the snapshot testing suite, you can add the `.json` file to `Tests/Samples`. Re-run the snapshot tests to generate the new snapshot image files. - - To update existing snapshots after making changes, you can set `isRecording = true` in `SnapshotTests.swift` `setUp()` method and then re-run the snapshot tests. - -The project also includes several helpful commands defined in our [Rakefile](https://github.com/airbnb/lottie-ios/blob/master/Rakefile). To use these, you need to install [Bundler](https://bundler.io/): - -```bash -$ sudo gem install bundle -$ bundle install -``` - -For example, all Swift code should be formatted according to the [Airbnb Swift Style Guide](https://github.com/airbnb/swift). After making changes, you can reformat the code automatically using [SwiftFormat](https://github.com/nicklockwood/SwiftFormat) and [SwiftLint](https://github.com/realm/SwiftLint) by running `bundle exec rake format:swift`. Other helpful commands include: - -```bash -$ bundle exec rake build:all # builds all targets for all platforms -$ bundle exec rake build:package:iOS # builds the Lottie package for iOS -$ bundle exec rake test:package # tests the Lottie package -$ bundle exec rake format:swift # reformat Swift code based on the Airbnb Swift Style Guide -``` diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/CAAnimation+TimingConfiguration.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/CAAnimation+TimingConfiguration.swift deleted file mode 100644 index a36a810..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/CAAnimation+TimingConfiguration.swift +++ /dev/null @@ -1,81 +0,0 @@ -// Created by Cal Stephens on 1/6/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -import QuartzCore - -extension CAAnimation { - /// Creates a `CAAnimation` that wraps this animation, - /// applying timing-related configuration from the given `LayerAnimationContext`. - /// - This animation should start at the beginning of the animation and - /// last the entire duration of the animation. It will be trimmed and retimed - /// to match the current playback state / looping configuration of the animation view. - @nonobjc - func timed(with context: LayerAnimationContext, for layer: CALayer) -> CAAnimation { - // The base animation always has the duration of the full animation, - // since that's the time space where keyframing and interpolating happens. - // So we start with a simple animation timeline from 0% to 100%: - // - // ┌──────────────────────────────────┐ - // │ baseAnimation │ - // └──────────────────────────────────┘ - // 0% 100% - // - let baseAnimation = self - baseAnimation.duration = context.animation.duration - baseAnimation.speed = (context.endFrame < context.startFrame) ? -1 : 1 - - // To select the subrange of the `baseAnimation` that should be played, - // we create a parent animation with the duration of that subrange - // to clip the `baseAnimation`. This parent animation can then loop - // and/or autoreverse over the clipped subrange. - // - // ┌────────────────────┬───────► - // │ clippingParent │ ... - // └────────────────────┴───────► - // 25% 75% - // ┌──────────────────────────────────┐ - // │ baseAnimation │ - // └──────────────────────────────────┘ - // 0% 100% - // - let clippingParent = CAAnimationGroup() - clippingParent.animations = [baseAnimation] - - clippingParent.duration = Double(abs(context.endFrame - context.startFrame)) / context.animation.framerate - baseAnimation.timeOffset = context.animation.time(forFrame: context.startFrame) - - clippingParent.autoreverses = context.timingConfiguration.autoreverses - clippingParent.repeatCount = context.timingConfiguration.repeatCount - clippingParent.timeOffset = context.timingConfiguration.timeOffset - - // Once the animation ends, it should pause on the final frame - clippingParent.fillMode = .both - clippingParent.isRemovedOnCompletion = false - - // We can pause the animation on a specific frame by setting the root layer's - // `speed` to 0, and then setting the `timeOffset` for the given frame. - // - For that setup to work properly, we have to set the `beginTime` - // of this animation to a time slightly before the current time. - // - It's not really clear why this is necessary, but `timeOffset` - // is not applied correctly without this configuration. - // - We can't do this when playing the animation in real time, - // because it can cause keyframe timings to be incorrect. - if context.timingConfiguration.speed == 0 { - let currentTime = layer.convertTime(CACurrentMediaTime(), from: nil) - clippingParent.beginTime = currentTime - .leastNonzeroMagnitude - } - - return clippingParent - } -} - -extension CALayer { - /// Adds the given animation to this layer, timed with the given timing configuration - /// - The given animation should start at the beginning of the animation and - /// last the entire duration of the animation. It will be trimmed and retimed - /// to match the current playback state / looping configuration of the animation view. - @nonobjc - func add(_ animation: CAPropertyAnimation, timedWith context: LayerAnimationContext) { - add(animation.timed(with: context, for: self), forKey: animation.keyPath) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/CALayer+addAnimation.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/CALayer+addAnimation.swift deleted file mode 100644 index 0c4dd77..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/CALayer+addAnimation.swift +++ /dev/null @@ -1,460 +0,0 @@ -// Created by Cal Stephens on 12/14/21. -// Copyright © 2021 Airbnb Inc. All rights reserved. - -import QuartzCore - -extension CALayer { - - // MARK: Internal - - /// Constructs a `CAKeyframeAnimation` that reflects the given keyframes, - /// and adds it to this `CALayer`. - @nonobjc - func addAnimation( - for property: LayerProperty, - keyframes: KeyframeGroup, - value keyframeValueMapping: (KeyframeValue) throws -> ValueRepresentation, - context: LayerAnimationContext) - throws - { - if let customAnimation = try customizedAnimation(for: property, context: context) { - add(customAnimation, timedWith: context) - } - - else if - let defaultAnimation = try defaultAnimation( - for: property, - keyframes: keyframes, - value: keyframeValueMapping, - context: context) - { - let timedAnimation = defaultAnimation.timed(with: context, for: self) - add(timedAnimation, forKey: property.caLayerKeypath) - } - } - - // MARK: Private - - /// Constructs a `CAAnimation` that reflects the given keyframes - /// - If the value can be applied directly to the CALayer using KVC, - /// then no `CAAnimation` will be created and the value will be applied directly. - @nonobjc - private func defaultAnimation( - for property: LayerProperty, - keyframes keyframeGroup: KeyframeGroup, - value keyframeValueMapping: (KeyframeValue) throws -> ValueRepresentation, - context: LayerAnimationContext) - throws -> CAAnimation? - { - let keyframes = keyframeGroup.keyframes - guard !keyframes.isEmpty else { return nil } - - // Check if this set of keyframes uses After Effects expressions, which aren't supported. - if let unsupportedAfterEffectsExpression = keyframeGroup.unsupportedAfterEffectsExpression { - context.logger.info(""" - `\(property.caLayerKeypath)` animation for "\(context.currentKeypath.fullPath)" \ - includes an After Effects expression (https://helpx.adobe.com/after-effects/using/expression-language.html), \ - which is not supported by lottie-ios (expressions are only supported by lottie-web). \ - This animation may not play correctly. - - \(unsupportedAfterEffectsExpression.replacingOccurrences(of: "\n", with: "\n ")) - - """) - } - - // If there is exactly one keyframe value, we can improve performance - // by applying that value directly to the layer instead of creating - // a relatively expensive `CAKeyframeAnimation`. - if keyframes.count == 1 { - return singleKeyframeAnimation( - for: property, - keyframeValue: try keyframeValueMapping(keyframes[0].value), - writeDirectlyToPropertyIfPossible: true) - } - - // Split the keyframes into segments with the same `CAAnimationCalculationMode` value - // - Each of these segments will become their own `CAKeyframeAnimation` - let animationSegments = keyframes.segmentsSplitByCalculationMode() - - // If we only have a single segment, we can just create a single `CAKeyframeAnimation` - // instead of wrapping it in a `CAAnimationGroup` -- this reduces allocation overhead a bit. - if animationSegments.count == 1 { - return try keyframeAnimation( - for: property, - keyframes: animationSegments[0], - value: keyframeValueMapping, - context: context) - } else { - return try animationGroup( - for: property, - animationSegments: animationSegments, - value: keyframeValueMapping, - context: context) - } - } - - /// A `CAAnimation` that applies the custom value from the `AnyValueProvider` - /// registered for this specific property's `AnimationKeypath`, - /// if one has been registered using `LottieAnimationView.setValueProvider(_:keypath:)`. - @nonobjc - private func customizedAnimation( - for property: LayerProperty, - context: LayerAnimationContext) - throws -> CAPropertyAnimation? - { - guard - let customizableProperty = property.customizableProperty, - let customKeyframes = try context.valueProviderStore.customKeyframes( - of: customizableProperty, - for: AnimationKeypath(keys: context.currentKeypath.keys + customizableProperty.name.map { $0.rawValue }), - context: context) - else { return nil } - - // Since custom animations are overriding an existing animation, - // we always have to create a CAAnimation and can't write directly - // to the layer property - if - customKeyframes.keyframes.count == 1, - let singleKeyframeAnimation = singleKeyframeAnimation( - for: property, - keyframeValue: customKeyframes.keyframes[0].value, - writeDirectlyToPropertyIfPossible: false) - { - return singleKeyframeAnimation - } - - return try keyframeAnimation( - for: property, - keyframes: Array(customKeyframes.keyframes), - value: { $0 }, - context: context) - } - - /// Creates an animation that applies a single keyframe to this layer property - /// - In many cases this animation can be omitted entirely, and the underlying - /// property can be set directly. In that case, no animation will be created. - private func singleKeyframeAnimation( - for property: LayerProperty, - keyframeValue: ValueRepresentation, - writeDirectlyToPropertyIfPossible: Bool) - -> CABasicAnimation? - { - if writeDirectlyToPropertyIfPossible { - // If the keyframe value is the same as the layer's default value for this property, - // then we can just ignore this set of keyframes. - if property.isDefaultValue(keyframeValue) { - return nil - } - - // If the property on the CALayer being animated hasn't been modified from the default yet, - // then we can apply the keyframe value directly to the layer using KVC instead - // of creating a `CAAnimation`. - let currentValue = value(forKey: property.caLayerKeypath) as? ValueRepresentation - if property.isDefaultValue(currentValue) { - setValue(keyframeValue, forKeyPath: property.caLayerKeypath) - return nil - } - } - - // Otherwise, we still need to create a `CAAnimation`, but we can - // create a simple `CABasicAnimation` that is still less expensive - // than computing a `CAKeyframeAnimation`. - let animation = CABasicAnimation(keyPath: property.caLayerKeypath) - animation.fromValue = keyframeValue - animation.toValue = keyframeValue - return animation - } - - /// Creates a `CAAnimationGroup` that wraps a `CAKeyframeAnimation` for each - /// of the given `animationSegments` - private func animationGroup( - for property: LayerProperty, - animationSegments: [[Keyframe]], - value keyframeValueMapping: (KeyframeValue) throws -> ValueRepresentation, - context: LayerAnimationContext) - throws -> CAAnimationGroup - { - // Build the `CAKeyframeAnimation` for each segment of keyframes - // with the same `CAAnimationCalculationMode`. - // - Here we have a non-zero number of animation segments, - // all of which have a non-zero number of keyframes. - let segmentAnimations: [CAKeyframeAnimation] = try animationSegments.indices.map { index in - let animationSegment = animationSegments[index] - var segmentStartTime = context.time(for: animationSegment.first!.time) - var segmentEndTime = context.time(for: animationSegment.last!.time) - - // Every portion of the animation timeline has to be covered by a `CAKeyframeAnimation`, - // so if this is the first or last segment then the start/end time should be exactly - // the start/end time of the animation itself. - let isFirstSegment = (index == animationSegments.indices.first!) - let isLastSegment = (index == animationSegments.indices.last!) - - if isFirstSegment { - segmentStartTime = min( - context.time(for: context.animation.startFrame), - segmentStartTime) - } - - if isLastSegment { - segmentEndTime = max( - context.time(for: context.animation.endFrame), - segmentEndTime) - } - - let segmentDuration = segmentEndTime - segmentStartTime - - // We're building `CAKeyframeAnimation`s, so the `keyTimes` are expressed - // relative to 0 (`segmentStartTime`) and 1 (`segmentEndTime`). This is different - // from the default behavior of the `keyframeAnimation` method, where times - // are expressed relative to the entire animation duration. - let customKeyTimes = animationSegment.map { keyframeModel -> NSNumber in - let keyframeTime = context.time(for: keyframeModel.time) - let segmentProgressTime = ((keyframeTime - segmentStartTime) / segmentDuration) - return segmentProgressTime as NSNumber - } - - let animation = try keyframeAnimation( - for: property, - keyframes: animationSegment, - value: keyframeValueMapping, - customKeyTimes: customKeyTimes, - context: context) - - animation.duration = segmentDuration - animation.beginTime = segmentStartTime - return animation - } - - let fullAnimation = CAAnimationGroup() - fullAnimation.animations = segmentAnimations - return fullAnimation - } - - /// Creates and validates a `CAKeyframeAnimation` for the given keyframes - private func keyframeAnimation( - for property: LayerProperty, - keyframes: [Keyframe], - value keyframeValueMapping: (KeyframeValue) throws -> ValueRepresentation, - customKeyTimes: [NSNumber]? = nil, - context: LayerAnimationContext) - throws - -> CAKeyframeAnimation - { - // Convert the list of `Keyframe` into - // the representation used by `CAKeyframeAnimation` - var keyTimes = customKeyTimes ?? keyframes.map { keyframeModel -> NSNumber in - NSNumber(value: Float(context.progressTime(for: keyframeModel.time))) - } - - var timingFunctions = timingFunctions(for: keyframes) - let calculationMode = calculationMode(for: keyframes) - - let animation = CAKeyframeAnimation(keyPath: property.caLayerKeypath) - - // Position animations define a `CGPath` curve that should be followed, - // instead of animating directly between keyframe point values. - if property.caLayerKeypath == LayerProperty.position.caLayerKeypath { - animation.path = try path(keyframes: keyframes, value: { value in - guard let point = try keyframeValueMapping(value) as? CGPoint else { - context.logger.assertionFailure("Cannot create point from keyframe with value \(value)") - return .zero - } - - return point - }) - } - - // All other types of keyframes provide individual values that are interpolated by Core Animation - else { - var values = try keyframes.map { keyframeModel in - try keyframeValueMapping(keyframeModel.value) - } - - validate( - values: &values, - keyTimes: &keyTimes, - timingFunctions: &timingFunctions, - for: calculationMode, - context: context) - - animation.values = values - } - - animation.calculationMode = calculationMode - animation.keyTimes = keyTimes - animation.timingFunctions = timingFunctions - return animation - } - - /// The `CAAnimationCalculationMode` that should be used for a `CAKeyframeAnimation` - /// animating the given keyframes - private func calculationMode( - for keyframes: [Keyframe]) - -> CAAnimationCalculationMode - { - // At this point we expect all of the animations to have been split in - // to segments based on the `CAAnimationCalculationMode`, so we can just - // check the first keyframe. - if keyframes[0].isHold { - return .discrete - } else { - return .linear - } - } - - /// `timingFunctions` to apply to a `CAKeyframeAnimation` animating the given keyframes - private func timingFunctions( - for keyframes: [Keyframe]) - -> [CAMediaTimingFunction] - { - // Compute the timing function between each keyframe and the subsequent keyframe - var timingFunctions: [CAMediaTimingFunction] = [] - - for (index, keyframe) in keyframes.enumerated() - where index != keyframes.indices.last - { - let nextKeyframe = keyframes[index + 1] - - let controlPoint1 = keyframe.outTangent?.pointValue ?? .zero - let controlPoint2 = nextKeyframe.inTangent?.pointValue ?? CGPoint(x: 1, y: 1) - - timingFunctions.append(CAMediaTimingFunction( - controlPoints: - Float(controlPoint1.x), - Float(controlPoint1.y), - Float(controlPoint2.x), - Float(controlPoint2.y))) - } - - return timingFunctions - } - - /// Creates a `CGPath` for the given `position` keyframes, - /// which accounts for `spatialInTangent`s and `spatialOutTangents` - private func path( - keyframes positionKeyframes: [Keyframe], - value keyframeValueMapping: (KeyframeValue) throws -> CGPoint) rethrows - -> CGPath - { - let path = CGMutablePath() - - for (index, keyframe) in positionKeyframes.enumerated() { - if index == positionKeyframes.indices.first { - path.move(to: try keyframeValueMapping(keyframe.value)) - } - - if index != positionKeyframes.indices.last { - let nextKeyframe = positionKeyframes[index + 1] - - if - let controlPoint1 = keyframe.spatialOutTangent?.pointValue, - let controlPoint2 = nextKeyframe.spatialInTangent?.pointValue, - !(controlPoint1 == .zero && controlPoint2 == .zero) - { - path.addCurve( - to: try keyframeValueMapping(nextKeyframe.value), - control1: try keyframeValueMapping(keyframe.value) + controlPoint1, - control2: try keyframeValueMapping(nextKeyframe.value) + controlPoint2) - } - - else { - path.addLine(to: try keyframeValueMapping(nextKeyframe.value)) - } - } - } - - path.closeSubpath() - return path - } - - /// Validates that the requirements of the `CAKeyframeAnimation` API are met correctly - private func validate( - values: inout [ValueRepresentation], - keyTimes: inout [NSNumber], - timingFunctions: inout [CAMediaTimingFunction], - for calculationMode: CAAnimationCalculationMode, - context: LayerAnimationContext) - { - // Validate that we have correct start (0.0) and end (1.0) keyframes. - // From the documentation of `CAKeyframeAnimation.keyTimes`: - // - The first value in the `keyTimes` array must be 0.0 and the last value must be 1.0. - if keyTimes.first != 0.0 { - keyTimes.insert(0.0, at: 0) - values.insert(values[0], at: 0) - timingFunctions.insert(CAMediaTimingFunction(name: .linear), at: 0) - } - - if keyTimes.last != 1.0 { - keyTimes.append(1.0) - values.append(values.last!) - timingFunctions.append(CAMediaTimingFunction(name: .linear)) - } - - switch calculationMode { - case .linear, .cubic: - // From the documentation of `CAKeyframeAnimation.keyTimes`: - // - The number of elements in the keyTimes array - // should match the number of elements in the values property - context.logger.assert( - values.count == keyTimes.count, - "`values.count` must exactly equal `keyTimes.count`") - - context.logger.assert( - timingFunctions.count == (values.count - 1), - "`timingFunctions.count` must exactly equal `values.count - 1`") - - case .discrete: - // From the documentation of `CAKeyframeAnimation.keyTimes`: - // - If the calculationMode is set to discrete... the keyTimes array - // should have one more entry than appears in the values array. - values.removeLast() - - context.logger.assert( - keyTimes.count == values.count + 1, - "`keyTimes.count` must exactly equal `values.count + 1`") - - default: - context.logger.assertionFailure(""" - Unexpected keyframe calculation mode \(calculationMode) - """) - } - } - -} - -extension RandomAccessCollection { - /// Splits this array of `Keyframe`s into segments with the same `CAAnimationCalculationMode` - /// - Keyframes with `isHold=true` become `discrete`, and keyframes with `isHold=false` - /// become linear. Each `CAKeyframeAnimation` can only be one or the other, so each - /// `calculationModeSegment` becomes its own `CAKeyframeAnimation`. - func segmentsSplitByCalculationMode() -> [[Element]] - where Element == Keyframe, Index == Int - { - var segments: [[Element]] = [] - var currentSegment: [Element] = [] - - for keyframe in self { - guard let mostRecentKeyframe = currentSegment.last else { - currentSegment.append(keyframe) - continue - } - - // When `isHold` changes between any two given keyframes, we have to create a new segment - if keyframe.isHold != mostRecentKeyframe.isHold { - // Add this keyframe to both the existing segment that is ending, - // so we know how long that segment is, and the new segment, - // so we know when that segment starts. - currentSegment.append(keyframe) - segments.append(currentSegment) - currentSegment = [keyframe] - } - - else { - currentSegment.append(keyframe) - } - } - - segments.append(currentSegment) - return segments - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/CombinedShapeAnimation.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/CombinedShapeAnimation.swift deleted file mode 100644 index e5b888f..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/CombinedShapeAnimation.swift +++ /dev/null @@ -1,84 +0,0 @@ -// Created by Cal Stephens on 1/28/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -import QuartzCore - -extension CAShapeLayer { - /// Adds animations for the given `CombinedShapeItem` to this `CALayer` - @nonobjc - func addAnimations( - for combinedShapes: CombinedShapeItem, - context: LayerAnimationContext, - pathMultiplier: PathMultiplier) - throws - { - try addAnimation( - for: .path, - keyframes: combinedShapes.shapes, - value: { paths in - let combinedPath = CGMutablePath() - for path in paths { - combinedPath.addPath(path.cgPath().duplicated(times: pathMultiplier)) - } - return combinedPath - }, - context: context) - } -} - -// MARK: - CombinedShapeItem - -/// A custom `ShapeItem` subclass that combines multiple `Shape`s into a single `KeyframeGroup` -final class CombinedShapeItem: ShapeItem { - - // MARK: Lifecycle - - init(shapes: KeyframeGroup<[BezierPath]>, name: String) { - self.shapes = shapes - super.init(name: name, type: .shape, hidden: false) - } - - required init(from _: Decoder) throws { - fatalError("init(from:) has not been implemented") - } - - required init(dictionary _: [String: Any]) throws { - fatalError("init(dictionary:) has not been implemented") - } - - // MARK: Internal - - let shapes: KeyframeGroup<[BezierPath]> - -} - -extension CombinedShapeItem { - /// Manually combines the given shape keyframes by manually interpolating at each frame - static func manuallyInterpolating( - shapes: [KeyframeGroup], - name: String) - -> CombinedShapeItem - { - let interpolators = shapes.map { shape in - KeyframeInterpolator(keyframes: shape.keyframes) - } - - let times = shapes.flatMap { $0.keyframes.map { $0.time } } - - let minimumTime = times.min() ?? 0 - let maximumTime = times.max() ?? 0 - let animationLocalTimeRange = Int(minimumTime)...Int(maximumTime) - - let interpolatedKeyframes = animationLocalTimeRange.map { localTime in - Keyframe( - value: interpolators.compactMap { interpolator in - interpolator.value(frame: AnimationFrameTime(localTime)) as? BezierPath - }, - time: AnimationFrameTime(localTime)) - } - - return CombinedShapeItem( - shapes: KeyframeGroup(keyframes: ContiguousArray(interpolatedKeyframes)), - name: name) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/CustomPathAnimation.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/CustomPathAnimation.swift deleted file mode 100644 index db56da1..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/CustomPathAnimation.swift +++ /dev/null @@ -1,80 +0,0 @@ -// Created by Cal Stephens on 12/21/21. -// Copyright © 2021 Airbnb Inc. All rights reserved. - -import QuartzCore - -extension CAShapeLayer { - /// Adds animations for the given `BezierPath` keyframes to this `CALayer` - @nonobjc - func addAnimations( - for customPath: KeyframeGroup, - context: LayerAnimationContext, - pathMultiplier: PathMultiplier = 1, - transformPath: (CGPath) -> CGPath = { $0 }, - roundedCorners: RoundedCorners? = nil) - throws - { - let combinedKeyframes = try BezierPathKeyframe.combining( - path: customPath, - cornerRadius: roundedCorners?.radius) - - try addAnimation( - for: .path, - keyframes: combinedKeyframes, - value: { pathKeyframe in - var path = pathKeyframe.path - if let cornerRadius = pathKeyframe.cornerRadius { - path = path.roundCorners(radius: cornerRadius.cgFloatValue) - } - - return transformPath(path.cgPath().duplicated(times: pathMultiplier)) - }, - context: context) - } -} - -extension CGPath { - /// Duplicates this `CGPath` so that it is repeated the given number of times - func duplicated(times: Int) -> CGPath { - if times <= 1 { - return self - } - - let cgPath = CGMutablePath() - - for _ in 0.., - cornerRadius: KeyframeGroup?) throws - -> KeyframeGroup - { - guard - let cornerRadius = cornerRadius, - cornerRadius.keyframes.contains(where: { $0.value.cgFloatValue > 0 }) - else { - return path.map { path in - BezierPathKeyframe(path: path, cornerRadius: nil) - } - } - - return Keyframes.combined( - path, cornerRadius, - makeCombinedResult: BezierPathKeyframe.init) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/EllipseAnimation.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/EllipseAnimation.swift deleted file mode 100644 index a514cbb..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/EllipseAnimation.swift +++ /dev/null @@ -1,43 +0,0 @@ -// Created by Cal Stephens on 12/21/21. -// Copyright © 2021 Airbnb Inc. All rights reserved. - -import QuartzCore - -extension CAShapeLayer { - /// Adds animations for the given `Ellipse` to this `CALayer` - @nonobjc - func addAnimations( - for ellipse: Ellipse, - context: LayerAnimationContext, - pathMultiplier: PathMultiplier) - throws - { - try addAnimation( - for: .path, - keyframes: ellipse.combinedKeyframes(), - value: { keyframe in - BezierPath.ellipse( - size: keyframe.size.sizeValue, - center: keyframe.position.pointValue, - direction: ellipse.direction) - .cgPath() - .duplicated(times: pathMultiplier) - }, - context: context) - } -} - -extension Ellipse { - /// Data that represents how to render an ellipse at a specific point in time - struct Keyframe { - let size: LottieVector3D - let position: LottieVector3D - } - - /// Creates a single array of animatable keyframes from the separate arrays of keyframes in this Ellipse - func combinedKeyframes() throws -> KeyframeGroup { - Keyframes.combined( - size, position, - makeCombinedResult: Ellipse.Keyframe.init) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/GradientAnimations.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/GradientAnimations.swift deleted file mode 100644 index 75b43a4..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/GradientAnimations.swift +++ /dev/null @@ -1,231 +0,0 @@ -// Created by Cal Stephens on 1/7/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -import QuartzCore - -// MARK: - GradientShapeItem - -/// A `ShapeItem` that represents a gradient -protocol GradientShapeItem: OpacityAnimationModel { - var startPoint: KeyframeGroup { get } - var endPoint: KeyframeGroup { get } - var gradientType: GradientType { get } - var numberOfColors: Int { get } - var colors: KeyframeGroup<[Double]> { get } -} - -// MARK: - GradientFill + GradientShapeItem - -extension GradientFill: GradientShapeItem { } - -// MARK: - GradientStroke + GradientShapeItem - -extension GradientStroke: GradientShapeItem { } - -// MARK: - GradientRenderLayer + GradientShapeItem - -extension GradientRenderLayer { - - // MARK: Internal - - /// Adds gradient-related animations to this layer, from the given `GradientFill` - /// - The RGB components and alpha components can have different color stops / locations, - /// so have to be rendered in separate `CAGradientLayer`s. - func addGradientAnimations( - for gradient: GradientShapeItem, - type: GradientContentType, - context: LayerAnimationContext) - throws - { - // We have to set `colors` and `locations` to non-nil values - // for the animations below to actually take effect - locations = [] - - // The initial value for `colors` must be an array with the exact same number of colors - // as the gradient that will be applied in the `CAAnimation` - switch type { - case .rgb: - colors = .init( - repeating: CGColor.rgb(0, 0, 0), - count: gradient.numberOfColors) - - case .alpha: - colors = .init( - repeating: CGColor.rgb(0, 0, 0), - count: gradient.colorConfiguration(from: gradient.colors.keyframes[0].value, type: .alpha).count) - } - - try addAnimation( - for: .colors, - keyframes: gradient.colors, - value: { colorComponents in - gradient.colorConfiguration(from: colorComponents, type: type).map { $0.color } - }, - context: context) - - try addAnimation( - for: .locations, - keyframes: gradient.colors, - value: { colorComponents in - gradient.colorConfiguration(from: colorComponents, type: type).map { $0.location } - }, - context: context) - - try addOpacityAnimation(for: gradient, context: context) - - switch gradient.gradientType { - case .linear: - try addLinearGradientAnimations(for: gradient, context: context) - case .radial: - try addRadialGradientAnimations(for: gradient, context: context) - case .none: - break - } - } - - // MARK: Private - - private func addLinearGradientAnimations( - for gradient: GradientShapeItem, - context: LayerAnimationContext) - throws - { - type = .axial - - try addAnimation( - for: .startPoint, - keyframes: gradient.startPoint, - value: { absoluteStartPoint in - percentBasedPointInBounds(from: absoluteStartPoint.pointValue) - }, - context: context) - - try addAnimation( - for: .endPoint, - keyframes: gradient.endPoint, - value: { absoluteEndPoint in - percentBasedPointInBounds(from: absoluteEndPoint.pointValue) - }, - context: context) - } - - private func addRadialGradientAnimations(for gradient: GradientShapeItem, context: LayerAnimationContext) throws { - type = .radial - - let combinedKeyframes = Keyframes.combined( - gradient.startPoint, gradient.endPoint, - makeCombinedResult: { absoluteStartPoint, absoluteEndPoint -> (startPoint: CGPoint, endPoint: CGPoint) in - // Convert the absolute start / end points to the relative structure used by Core Animation - let relativeStartPoint = percentBasedPointInBounds(from: absoluteStartPoint.pointValue) - let radius = absoluteStartPoint.pointValue.distanceTo(absoluteEndPoint.pointValue) - let relativeEndPoint = percentBasedPointInBounds( - from: CGPoint( - x: absoluteStartPoint.x + radius, - y: absoluteStartPoint.y + radius)) - - return (startPoint: relativeStartPoint, endPoint: relativeEndPoint) - }) - - try addAnimation( - for: .startPoint, - keyframes: combinedKeyframes, - value: \.startPoint, - context: context) - - try addAnimation( - for: .endPoint, - keyframes: combinedKeyframes, - value: \.endPoint, - context: context) - } -} - -// MARK: - GradientContentType - -/// Each type of gradient that can be constructed from a `GradientShapeItem` -enum GradientContentType { - case rgb - case alpha -} - -/// `colors` and `locations` configuration for a `CAGradientLayer` -typealias GradientColorConfiguration = [(color: CGColor, location: CGFloat)] - -extension GradientShapeItem { - - // MARK: Internal - - /// Whether or not this `GradientShapeItem` includes an alpha component - /// that has to be rendered as a separate `CAGradientLayer` from the - /// layer that renders the rgb color components - var hasAlphaComponent: Bool { - for colorComponentsKeyframe in colors.keyframes { - let colorComponents = colorComponentsKeyframe.value - let alphaConfiguration = colorConfiguration(from: colorComponents, type: .alpha) - - let notFullyOpaque = alphaConfiguration.contains(where: { color, _ in - color.alpha < 0.999 - }) - - if notFullyOpaque { - return true - } - } - - return false - } - - // MARK: Fileprivate - - /// Converts the compact `[Double]` color components representation - /// into an array of `CGColor`s and the location of those colors within the gradient. - /// - The color components array is a repeating list of `[location, red, green, blue]` values - /// for each color in the gradient, followed by an optional repeating list of - /// `[location, alpha]` values that control the colors' alpha values. - /// - The RGB and alpha values can have different color stops / locations, - /// so each has to be rendered in a separate `CAGradientLayer`. - fileprivate func colorConfiguration( - from colorComponents: [Double], - type: GradientContentType) - -> GradientColorConfiguration - { - switch type { - case .rgb: - precondition( - colorComponents.count >= numberOfColors * 4, - "Each color must have RGB components and a location component") - - // Each group of four `Double` values represents a single `CGColor`, - // and its relative location within the gradient. - var colors = GradientColorConfiguration() - - for colorIndex in 0.. { - /// The `CALayer` KVC key path that this value should be assigned to - let caLayerKeypath: String - - /// Whether or not the given value is the default value for this property - /// - If the keyframe values are just equal to the default value, - /// then we can improve performance a bit by just not creating - /// a CAAnimation (since it would be redundant). - let isDefaultValue: (ValueRepresentation?) -> Bool - - /// A description of how this property can be customized dynamically - /// at runtime using `AnimationView.setValueProvider(_:keypath:)` - let customizableProperty: CustomizableProperty? -} - -extension LayerProperty where ValueRepresentation: Equatable { - init( - caLayerKeypath: String, - defaultValue: ValueRepresentation?, - customizableProperty: CustomizableProperty?) - { - self.init( - caLayerKeypath: caLayerKeypath, - isDefaultValue: { $0 == defaultValue }, - customizableProperty: customizableProperty) - } -} - -// MARK: - CustomizableProperty - -/// A description of how a `CALayer` property can be customized dynamically -/// at runtime using `LottieAnimationView.setValueProvider(_:keypath:)` -struct CustomizableProperty { - /// The name that `AnimationKeypath`s can use to refer to this property - /// - When building an animation for this property that will be applied - /// to a specific layer, this `name` is appended to the end of that - /// layer's `AnimationKeypath`. The combined keypath is used to query - /// the `ValueProviderStore`. - let name: [PropertyName] - - /// A closure that coverts the type-erased value of an `AnyValueProvider` - /// to the strongly-typed representation used by this property, if possible. - let conversion: (Any) -> ValueRepresentation? -} - -// MARK: - PropertyName - -/// The name of a customizable property that can be used in an `AnimationKeypath` -/// - These values should be shared between the two rendering engines, -/// since they form the public API of the `AnimationKeypath` system. -enum PropertyName: String, CaseIterable { - case color = "Color" - case opacity = "Opacity" - case scale = "Scale" - case position = "Position" - case rotation = "Rotation" -} - -// MARK: CALayer properties - -extension LayerProperty { - static var position: LayerProperty { - .init( - caLayerKeypath: "transform.translation", - defaultValue: CGPoint(x: 0, y: 0), - customizableProperty: .position) - } - - static var positionX: LayerProperty { - .init( - caLayerKeypath: "transform.translation.x", - defaultValue: 0, - customizableProperty: nil /* currently unsupported */ ) - } - - static var positionY: LayerProperty { - .init( - caLayerKeypath: "transform.translation.y", - defaultValue: 0, - customizableProperty: nil /* currently unsupported */ ) - } - - static var scale: LayerProperty { - .init( - caLayerKeypath: "transform.scale", - defaultValue: 1, - customizableProperty: nil /* currently unsupported */ ) - } - - static var scaleX: LayerProperty { - .init( - caLayerKeypath: "transform.scale.x", - defaultValue: 1, - customizableProperty: .scaleX) - } - - static var scaleY: LayerProperty { - .init( - caLayerKeypath: "transform.scale.y", - defaultValue: 1, - customizableProperty: .scaleY) - } - - static var rotationX: LayerProperty { - .init( - caLayerKeypath: "transform.rotation.x", - defaultValue: 0, - customizableProperty: nil /* currently unsupported */ ) - } - - static var rotationY: LayerProperty { - .init( - caLayerKeypath: "transform.rotation.y", - defaultValue: 0, - customizableProperty: nil /* currently unsupported */ ) - } - - static var rotationZ: LayerProperty { - .init( - caLayerKeypath: "transform.rotation.z", - defaultValue: 0, - customizableProperty: .rotation) - } - - static var anchorPoint: LayerProperty { - .init( - caLayerKeypath: #keyPath(CALayer.anchorPoint), - // This is intentionally not `GGPoint(x: 0.5, y: 0.5)` (the actual default) - // to opt `anchorPoint` out of the KVC `setValue` flow, which causes issues. - defaultValue: nil, - customizableProperty: nil /* currently unsupported */ ) - } - - static var opacity: LayerProperty { - .init( - caLayerKeypath: #keyPath(CALayer.opacity), - defaultValue: 1, - customizableProperty: .opacity) - } - - static var transform: LayerProperty { - .init( - caLayerKeypath: #keyPath(CALayer.transform), - isDefaultValue: { transform in - guard let transform = transform else { return false } - return CATransform3DIsIdentity(transform) - }, - customizableProperty: nil /* currently unsupported */ ) - } -} - -// MARK: CAShapeLayer properties - -extension LayerProperty { - static var path: LayerProperty { - .init( - caLayerKeypath: #keyPath(CAShapeLayer.path), - defaultValue: nil, - customizableProperty: nil /* currently unsupported */ ) - } - - static var fillColor: LayerProperty { - .init( - caLayerKeypath: #keyPath(CAShapeLayer.fillColor), - defaultValue: nil, - customizableProperty: .color) - } - - static var lineWidth: LayerProperty { - .init( - caLayerKeypath: #keyPath(CAShapeLayer.lineWidth), - defaultValue: 1, - customizableProperty: nil /* currently unsupported */ ) - } - - static var lineDashPhase: LayerProperty { - .init( - caLayerKeypath: #keyPath(CAShapeLayer.lineDashPhase), - defaultValue: 0, - customizableProperty: nil /* currently unsupported */ ) - } - - static var strokeColor: LayerProperty { - .init( - caLayerKeypath: #keyPath(CAShapeLayer.strokeColor), - defaultValue: nil, - customizableProperty: .color) - } - - static var strokeStart: LayerProperty { - .init( - caLayerKeypath: #keyPath(CAShapeLayer.strokeStart), - defaultValue: 0, - customizableProperty: nil /* currently unsupported */ ) - } - - static var strokeEnd: LayerProperty { - .init( - caLayerKeypath: #keyPath(CAShapeLayer.strokeEnd), - defaultValue: 1, - customizableProperty: nil /* currently unsupported */ ) - } -} - -// MARK: CAGradientLayer properties - -extension LayerProperty { - static var colors: LayerProperty<[CGColor]> { - .init( - caLayerKeypath: #keyPath(CAGradientLayer.colors), - defaultValue: nil, - customizableProperty: nil /* currently unsupported */ ) - } - - static var locations: LayerProperty<[CGFloat]> { - .init( - caLayerKeypath: #keyPath(CAGradientLayer.locations), - defaultValue: nil, - customizableProperty: nil /* currently unsupported */ ) - } - - static var startPoint: LayerProperty { - .init( - caLayerKeypath: #keyPath(CAGradientLayer.startPoint), - defaultValue: nil, - customizableProperty: nil /* currently unsupported */ ) - } - - static var endPoint: LayerProperty { - .init( - caLayerKeypath: #keyPath(CAGradientLayer.endPoint), - defaultValue: nil, - customizableProperty: nil /* currently unsupported */ ) - } -} - -// MARK: - CustomizableProperty types - -extension CustomizableProperty { - static var color: CustomizableProperty { - .init( - name: [.color], - conversion: { typeErasedValue in - guard let color = typeErasedValue as? LottieColor else { - return nil - } - - return .rgba(CGFloat(color.r), CGFloat(color.g), CGFloat(color.b), CGFloat(color.a)) - }) - } - - static var opacity: CustomizableProperty { - .init( - name: [.opacity], - conversion: { typeErasedValue in - guard let vector = typeErasedValue as? LottieVector1D else { return nil } - - // Lottie animation files express opacity as a numerical percentage value - // (e.g. 50%, 100%, 200%) so we divide by 100 to get the decimal values - // expected by Core Animation (e.g. 0.5, 1.0, 2.0). - return vector.cgFloatValue / 100 - }) - } - - static var scaleX: CustomizableProperty { - .init( - name: [.scale], - conversion: { typeErasedValue in - guard let vector = typeErasedValue as? LottieVector3D else { return nil } - - // Lottie animation files express scale as a numerical percentage value - // (e.g. 50%, 100%, 200%) so we divide by 100 to get the decimal values - // expected by Core Animation (e.g. 0.5, 1.0, 2.0). - return vector.pointValue.x / 100 - }) - } - - static var scaleY: CustomizableProperty { - .init( - name: [.scale], - conversion: { typeErasedValue in - guard let vector = typeErasedValue as? LottieVector3D else { return nil } - - // Lottie animation files express scale as a numerical percentage value - // (e.g. 50%, 100%, 200%) so we divide by 100 to get the decimal values - // expected by Core Animation (e.g. 0.5, 1.0, 2.0). - return vector.pointValue.y / 100 - }) - } - - static var rotation: CustomizableProperty { - .init( - name: [.rotation], - conversion: { typeErasedValue in - guard let vector = typeErasedValue as? LottieVector1D else { return nil } - - // Lottie animation files express rotation in degrees - // (e.g. 90º, 180º, 360º) so we covert to radians to get the - // values expected by Core Animation (e.g. π/2, π, 2π) - return vector.cgFloatValue * .pi / 180 - }) - } - - static var position: CustomizableProperty { - .init( - name: [.position], - conversion: { ($0 as? LottieVector3D)?.pointValue }) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/OpacityAnimation.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/OpacityAnimation.swift deleted file mode 100644 index b7bf220..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/OpacityAnimation.swift +++ /dev/null @@ -1,52 +0,0 @@ -// Created by Cal Stephens on 5/17/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -import QuartzCore - -// MARK: - OpacityAnimationModel - -protocol OpacityAnimationModel { - /// The opacity animation to apply to a `CALayer` - var opacity: KeyframeGroup { get } -} - -// MARK: - Transform + OpacityAnimationModel - -extension Transform: OpacityAnimationModel { } - -// MARK: - ShapeTransform + OpacityAnimationModel - -extension ShapeTransform: OpacityAnimationModel { } - -// MARK: - Fill + OpacityAnimationModel - -extension Fill: OpacityAnimationModel { } - -// MARK: - GradientFill + OpacityAnimationModel - -extension GradientFill: OpacityAnimationModel { } - -// MARK: - Stroke + OpacityAnimationModel - -extension Stroke: OpacityAnimationModel { } - -// MARK: - GradientStroke + OpacityAnimationModel - -extension GradientStroke: OpacityAnimationModel { } - -extension CALayer { - /// Adds the opacity animation from the given `OpacityAnimationModel` to this layer - @nonobjc - func addOpacityAnimation(for opacity: OpacityAnimationModel, context: LayerAnimationContext) throws { - try addAnimation( - for: .opacity, - keyframes: opacity.opacity, - value: { - // Lottie animation files express opacity as a numerical percentage value - // (e.g. 0%, 50%, 100%) so we divide by 100 to get the decimal values - // expected by Core Animation (e.g. 0.0, 0.5, 1.0). - $0.cgFloatValue / 100 - }, - context: context) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/RectangleAnimation.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/RectangleAnimation.swift deleted file mode 100644 index 41147b4..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/RectangleAnimation.swift +++ /dev/null @@ -1,47 +0,0 @@ -// Created by Cal Stephens on 12/21/21. -// Copyright © 2021 Airbnb Inc. All rights reserved. - -import QuartzCore - -extension CAShapeLayer { - /// Adds animations for the given `Rectangle` to this `CALayer` - @nonobjc - func addAnimations( - for rectangle: Rectangle, - context: LayerAnimationContext, - pathMultiplier: PathMultiplier, - roundedCorners: RoundedCorners?) - throws - { - try addAnimation( - for: .path, - keyframes: try rectangle.combinedKeyframes(roundedCorners: roundedCorners), - value: { keyframe in - BezierPath.rectangle( - position: keyframe.position.pointValue, - size: keyframe.size.sizeValue, - cornerRadius: keyframe.cornerRadius.cgFloatValue, - direction: rectangle.direction) - .cgPath() - .duplicated(times: pathMultiplier) - }, - context: context) - } -} - -extension Rectangle { - /// Data that represents how to render a rectangle at a specific point in time - struct Keyframe { - let size: LottieVector3D - let position: LottieVector3D - let cornerRadius: LottieVector1D - } - - /// Creates a single array of animatable keyframes from the separate arrays of keyframes in this Rectangle - func combinedKeyframes(roundedCorners: RoundedCorners?) throws -> KeyframeGroup { - let cornerRadius = roundedCorners?.radius ?? cornerRadius - return Keyframes.combined( - size, position, cornerRadius, - makeCombinedResult: Rectangle.Keyframe.init) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/ShapeAnimation.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/ShapeAnimation.swift deleted file mode 100644 index 0559f29..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/ShapeAnimation.swift +++ /dev/null @@ -1,236 +0,0 @@ -// Created by Cal Stephens on 1/7/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -import QuartzCore - -extension CAShapeLayer { - /// Adds a `path` animation for the given `ShapeItem` - @nonobjc - func addAnimations( - for shape: ShapeItem, - context: LayerAnimationContext, - pathMultiplier: PathMultiplier, - roundedCorners: RoundedCorners?) - throws - { - switch shape { - case let customShape as Shape: - try addAnimations( - for: customShape.path, - context: context, - pathMultiplier: pathMultiplier, - roundedCorners: roundedCorners) - - case let combinedShape as CombinedShapeItem: - try addAnimations(for: combinedShape, context: context, pathMultiplier: pathMultiplier) - try context.compatibilityAssert(roundedCorners == nil, """ - Rounded corners support is not currently implemented for combined shape items - """) - - case let ellipse as Ellipse: - try addAnimations(for: ellipse, context: context, pathMultiplier: pathMultiplier) - - case let rectangle as Rectangle: - try addAnimations( - for: rectangle, - context: context, - pathMultiplier: pathMultiplier, - roundedCorners: roundedCorners) - - case let star as Star: - try addAnimations(for: star, context: context, pathMultiplier: pathMultiplier) - try context.compatibilityAssert(roundedCorners == nil, """ - Rounded corners support is currently not implemented for polygon items - """) - - default: - // None of the other `ShapeItem` subclasses draw a `path` - try context.logCompatibilityIssue("Unexpected shape type \(type(of: shape))") - return - } - } - - /// Adds a `fillColor` animation for the given `Fill` object - @nonobjc - func addAnimations(for fill: Fill, context: LayerAnimationContext) throws { - fillRule = fill.fillRule.caFillRule - - try addAnimation( - for: .fillColor, - keyframes: fill.color, - value: \.cgColorValue, - context: context) - - try addOpacityAnimation(for: fill, context: context) - } - - /// Adds animations for `strokeStart` and `strokeEnd` from the given `Trim` object - @nonobjc - func addAnimations(for trim: Trim, context: LayerAnimationContext) throws -> PathMultiplier { - let (strokeStartKeyframes, strokeEndKeyframes, pathMultiplier) = try trim.caShapeLayerKeyframes() - - try addAnimation( - for: .strokeStart, - keyframes: strokeStartKeyframes, - value: { strokeStart in - // Lottie animation files express stoke trims as a numerical percentage value - // (e.g. 25%, 50%, 100%) so we divide by 100 to get the decimal values - // expected by Core Animation (e.g. 0.25, 0.5, 1.0). - CGFloat(strokeStart.cgFloatValue) / CGFloat(pathMultiplier) / 100 - }, context: context) - - try addAnimation( - for: .strokeEnd, - keyframes: strokeEndKeyframes, - value: { strokeEnd in - // Lottie animation files express stoke trims as a numerical percentage value - // (e.g. 25%, 50%, 100%) so we divide by 100 to get the decimal values - // expected by Core Animation (e.g. 0.25, 0.5, 1.0). - CGFloat(strokeEnd.cgFloatValue) / CGFloat(pathMultiplier) / 100 - }, context: context) - - return pathMultiplier - } -} - -/// The number of times that a `CGPath` needs to be duplicated in order to support the animation's `Trim` keyframes -typealias PathMultiplier = Int - -extension Trim { - - // MARK: Fileprivate - - /// The `strokeStart` and `strokeEnd` keyframes to apply to a `CAShapeLayer`, - /// plus a `pathMultiplier` that should be applied to the layer's `path` so that - /// trim values larger than 100% can be displayed properly. - fileprivate func caShapeLayerKeyframes() - throws - -> (strokeStart: KeyframeGroup, strokeEnd: KeyframeGroup, pathMultiplier: PathMultiplier) - { - let strokeStart: KeyframeGroup - let strokeEnd: KeyframeGroup - - // CAShapeLayer requires strokeStart to be less than strokeEnd. This - // isn't required by the Lottie schema, so some animations may have - // strokeStart and strokeEnd flipped. - if startValueIsAlwaysLessOrEqualToThanEndValue() { - // If the start value is always _less than_ or equal to the end value - // then we can use the given values without any modifications - strokeStart = start - strokeEnd = end - } else if startValueIsAlwaysGreaterThanOrEqualToEndValue() { - // If the start value is always _greater than_ or equal to the end value, - // then we can just swap the start / end keyframes. This lets us avoid - // manually interpolating the keyframes values at each frame, which - // would be more expensive. - strokeStart = end - strokeEnd = start - } else { - // Otherwise if the start / end values ever swap places we have to - // fix the order on a per-keyframe basis, which may require manually - // interpolating the keyframe values at each frame. - (strokeStart, strokeEnd) = interpolatedAtEachFrame() - } - - // If there are no offsets, then the stroke values can be used as-is - guard - !offset.keyframes.isEmpty, - offset.keyframes.contains(where: { $0.value.cgFloatValue != 0 }) - else { - return (strokeStart, strokeEnd, 1) - } - - // Apply the offset to the start / end values at each frame - let offsetStrokeKeyframes = Keyframes.combined( - strokeStart, - strokeEnd, - offset, - makeCombinedResult: { start, end, offset -> (start: LottieVector1D, end: LottieVector1D) in - // Compute the adjusted value by converting the offset value to a stroke value - let offsetStart = start.cgFloatValue + (offset.cgFloatValue / 360 * 100) - let offsetEnd = end.cgFloatValue + (offset.cgFloatValue / 360 * 100) - return (start: LottieVector1D(offsetStart), end: LottieVector1D(offsetEnd)) - }) - - var adjustedStrokeStart = offsetStrokeKeyframes.map { $0.start } - var adjustedStrokeEnd = offsetStrokeKeyframes.map { $0.end } - - // If maximum stroke value is larger than 100%, then we have to create copies of the path - // so the total path length includes the maximum stroke - let startStrokes = adjustedStrokeStart.keyframes.map { $0.value.cgFloatValue } - let endStrokes = adjustedStrokeEnd.keyframes.map { $0.value.cgFloatValue } - let minimumStrokeMultiplier = Double(floor((startStrokes.min() ?? 0) / 100.0)) - let maximumStrokeMultiplier = Double(ceil((endStrokes.max() ?? 100) / 100.0)) - - if minimumStrokeMultiplier < 0 { - // Core Animation doesn't support negative stroke offsets, so we have to - // shift all of the offset values up by the minimum - adjustedStrokeStart = adjustedStrokeStart.map { LottieVector1D($0.value + (abs(minimumStrokeMultiplier) * 100.0)) } - adjustedStrokeEnd = adjustedStrokeEnd.map { LottieVector1D($0.value + (abs(minimumStrokeMultiplier) * 100.0)) } - } - - return ( - strokeStart: adjustedStrokeStart, - strokeEnd: adjustedStrokeEnd, - pathMultiplier: Int(abs(maximumStrokeMultiplier) + abs(minimumStrokeMultiplier))) - } - - // MARK: Private - - /// Checks whether or not the value for `trim.start` is less than - /// or equal to the value for every `trim.end` at every frame. - private func startValueIsAlwaysLessOrEqualToThanEndValue() -> Bool { - startAndEndValuesAllSatisfy { startValue, endValue in - startValue <= endValue - } - } - - /// Checks whether or not the value for `trim.start` is greater than - /// or equal to the value for every `trim.end` at every frame. - private func startValueIsAlwaysGreaterThanOrEqualToEndValue() -> Bool { - startAndEndValuesAllSatisfy { startValue, endValue in - startValue >= endValue - } - } - - private func startAndEndValuesAllSatisfy(_ condition: (_ start: CGFloat, _ end: CGFloat) -> Bool) -> Bool { - let keyframeTimes = Set(start.keyframes.map { $0.time } + end.keyframes.map { $0.time }) - - let startInterpolator = KeyframeInterpolator(keyframes: start.keyframes) - let endInterpolator = KeyframeInterpolator(keyframes: end.keyframes) - - for keyframeTime in keyframeTimes { - guard - let startAtTime = startInterpolator.value(frame: keyframeTime) as? LottieVector1D, - let endAtTime = endInterpolator.value(frame: keyframeTime) as? LottieVector1D - else { continue } - - if !condition(startAtTime.cgFloatValue, endAtTime.cgFloatValue) { - return false - } - } - - return true - } - - /// Interpolates the start and end keyframes, at each frame if necessary, - /// so that the value of `strokeStart` is always less than `strokeEnd`. - private func interpolatedAtEachFrame() - -> (strokeStart: KeyframeGroup, strokeEnd: KeyframeGroup) - { - let combinedKeyframes = Keyframes.combined( - start, - end, - makeCombinedResult: { startValue, endValue -> (start: LottieVector1D, end: LottieVector1D) in - if startValue.cgFloatValue < endValue.cgFloatValue { - return (start: startValue, end: endValue) - } else { - return (start: endValue, end: startValue) - } - }) - - return ( - strokeStart: combinedKeyframes.map { $0.start }, - strokeEnd: combinedKeyframes.map { $0.end }) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/StarAnimation.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/StarAnimation.swift deleted file mode 100644 index 44a47cd..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/StarAnimation.swift +++ /dev/null @@ -1,105 +0,0 @@ -// Created by Cal Stephens on 1/10/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -import QuartzCore - -extension CAShapeLayer { - - // MARK: Internal - - /// Adds animations for the given `Rectangle` to this `CALayer` - @nonobjc - func addAnimations( - for star: Star, - context: LayerAnimationContext, - pathMultiplier: PathMultiplier) - throws - { - switch star.starType { - case .star: - try addStarAnimation(for: star, context: context, pathMultiplier: pathMultiplier) - case .polygon: - try addPolygonAnimation(for: star, context: context, pathMultiplier: pathMultiplier) - case .none: - break - } - } - - // MARK: Private - - @nonobjc - private func addStarAnimation( - for star: Star, - context: LayerAnimationContext, - pathMultiplier: PathMultiplier) - throws - { - try addAnimation( - for: .path, - keyframes: try star.combinedKeyframes(), - value: { keyframe in - BezierPath.star( - position: keyframe.position.pointValue, - outerRadius: keyframe.outerRadius.cgFloatValue, - innerRadius: keyframe.innerRadius.cgFloatValue, - outerRoundedness: keyframe.outerRoundness.cgFloatValue, - innerRoundedness: keyframe.innerRoundness.cgFloatValue, - numberOfPoints: keyframe.points.cgFloatValue, - rotation: keyframe.rotation.cgFloatValue, - direction: star.direction) - .cgPath() - .duplicated(times: pathMultiplier) - }, - context: context) - } - - @nonobjc - private func addPolygonAnimation( - for star: Star, - context: LayerAnimationContext, - pathMultiplier: PathMultiplier) - throws - { - try addAnimation( - for: .path, - keyframes: try star.combinedKeyframes(), - value: { keyframe in - BezierPath.polygon( - position: keyframe.position.pointValue, - numberOfPoints: keyframe.points.cgFloatValue, - outerRadius: keyframe.outerRadius.cgFloatValue, - outerRoundedness: keyframe.outerRoundness.cgFloatValue, - rotation: keyframe.rotation.cgFloatValue, - direction: star.direction) - .cgPath() - .duplicated(times: pathMultiplier) - }, - context: context) - } -} - -extension Star { - /// Data that represents how to render a star at a specific point in time - struct Keyframe { - let position: LottieVector3D - let outerRadius: LottieVector1D - let innerRadius: LottieVector1D - let outerRoundness: LottieVector1D - let innerRoundness: LottieVector1D - let points: LottieVector1D - let rotation: LottieVector1D - } - - /// Creates a single array of animatable keyframes from the separate arrays of keyframes in this star/polygon - func combinedKeyframes() throws -> KeyframeGroup { - Keyframes.combined( - position, - outerRadius, - innerRadius ?? KeyframeGroup(LottieVector1D(0)), - outerRoundness, - innerRoundness ?? KeyframeGroup(LottieVector1D(0)), - points, - rotation, - makeCombinedResult: Star.Keyframe.init) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/StrokeAnimation.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/StrokeAnimation.swift deleted file mode 100644 index f6adfdd..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/StrokeAnimation.swift +++ /dev/null @@ -1,87 +0,0 @@ -// Created by Cal Stephens on 2/10/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -import Foundation -import QuartzCore - -// MARK: - StrokeShapeItem - -/// A `ShapeItem` that represents a stroke -protocol StrokeShapeItem: ShapeItem, OpacityAnimationModel { - var strokeColor: KeyframeGroup? { get } - var width: KeyframeGroup { get } - var lineCap: LineCap { get } - var lineJoin: LineJoin { get } - var miterLimit: Double { get } - var dashPattern: [DashElement]? { get } - func copy(width: KeyframeGroup) -> StrokeShapeItem -} - -// MARK: - Stroke + StrokeShapeItem - -extension Stroke: StrokeShapeItem { - var strokeColor: KeyframeGroup? { color } - - func copy(width: KeyframeGroup) -> StrokeShapeItem { - // Type-erase the copy from `Stroke` to `StrokeShapeItem` - let copy: Stroke = copy(width: width) - return copy - } -} - -// MARK: - GradientStroke + StrokeShapeItem - -extension GradientStroke: StrokeShapeItem { - var strokeColor: KeyframeGroup? { nil } - - func copy(width: KeyframeGroup) -> StrokeShapeItem { - // Type-erase the copy from `GradientStroke` to `StrokeShapeItem` - let copy: GradientStroke = copy(width: width) - return copy - } -} - -// MARK: - CAShapeLayer + StrokeShapeItem - -extension CAShapeLayer { - /// Adds animations for properties related to the given `Stroke` object (`strokeColor`, `lineWidth`, etc) - @nonobjc - func addStrokeAnimations(for stroke: StrokeShapeItem, context: LayerAnimationContext) throws { - lineJoin = stroke.lineJoin.caLineJoin - lineCap = stroke.lineCap.caLineCap - miterLimit = CGFloat(stroke.miterLimit) - - if let strokeColor = stroke.strokeColor { - try addAnimation( - for: .strokeColor, - keyframes: strokeColor, - value: \.cgColorValue, - context: context) - } - - try addAnimation( - for: .lineWidth, - keyframes: stroke.width, - value: \.cgFloatValue, - context: context) - - try addOpacityAnimation(for: stroke, context: context) - - if let (dashPattern, dashPhase) = stroke.dashPattern?.shapeLayerConfiguration { - let lineDashPattern = try dashPattern.map { - try KeyframeGroup(keyframes: $0) - .exactlyOneKeyframe(context: context, description: "stroke dashPattern").cgFloatValue - } - - if lineDashPattern.isSupportedLayerDashPattern { - self.lineDashPattern = lineDashPattern as [NSNumber] - } - - try addAnimation( - for: .lineDashPhase, - keyframes: KeyframeGroup(keyframes: dashPhase), - value: \.cgFloatValue, - context: context) - } - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/TransformAnimations.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/TransformAnimations.swift deleted file mode 100644 index 26c52e0..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/TransformAnimations.swift +++ /dev/null @@ -1,329 +0,0 @@ -// Created by Cal Stephens on 12/17/21. -// Copyright © 2021 Airbnb Inc. All rights reserved. - -import QuartzCore - -// MARK: - TransformModel - -/// This protocol mirrors the interface of `Transform`, -/// but it also implemented by `ShapeTransform` to allow -/// both transform types to share the same animation implementation. -protocol TransformModel { - /// The anchor point of the transform. - var anchorPoint: KeyframeGroup { get } - - /// The position of the transform. This is nil if the position data was split. - var _position: KeyframeGroup? { get } - - /// The positionX of the transform. This is nil if the position property is set. - var _positionX: KeyframeGroup? { get } - - /// The positionY of the transform. This is nil if the position property is set. - var _positionY: KeyframeGroup? { get } - - /// The scale of the transform - var scale: KeyframeGroup { get } - - /// The rotation of the transform on X axis. - var rotationX: KeyframeGroup { get } - - /// The rotation of the transform on Y axis. - var rotationY: KeyframeGroup { get } - - /// The rotation of the transform on Z axis. - var rotationZ: KeyframeGroup { get } -} - -// MARK: - Transform + TransformModel - -extension Transform: TransformModel { - var _position: KeyframeGroup? { position } - var _positionX: KeyframeGroup? { positionX } - var _positionY: KeyframeGroup? { positionY } -} - -// MARK: - ShapeTransform + TransformModel - -extension ShapeTransform: TransformModel { - var anchorPoint: KeyframeGroup { anchor } - var _position: KeyframeGroup? { position } - var _positionX: KeyframeGroup? { nil } - var _positionY: KeyframeGroup? { nil } -} - -// MARK: - CALayer + TransformModel - -extension CALayer { - - // MARK: Internal - - /// Adds transform-related animations from the given `TransformModel` to this layer - /// - This _doesn't_ apply `transform.opacity`, which has to be handled separately - /// since child layers don't inherit the `opacity` of their parent. - @nonobjc - func addTransformAnimations( - for transformModel: TransformModel, - context: LayerAnimationContext) - throws - { - // CALayers don't support animating skew with its own set of keyframes. - // If the transform includes a skew, we have to combine all of the transform - // components into a single set of keyframes. - // Only `ShapeTransform` supports skews. - if - let shapeTransform = transformModel as? ShapeTransform, - shapeTransform.hasSkew - { - try addCombinedTransformAnimation(for: shapeTransform, context: context) - } - - else { - try addPositionAnimations(from: transformModel, context: context) - try addAnchorPointAnimation(from: transformModel, context: context) - try addScaleAnimations(from: transformModel, context: context) - try addRotationAnimations(from: transformModel, context: context) - } - } - - // MARK: Private - - @nonobjc - private func addPositionAnimations( - from transformModel: TransformModel, - context: LayerAnimationContext) - throws - { - if let positionKeyframes = transformModel._position { - try addAnimation( - for: .position, - keyframes: positionKeyframes, - value: \.pointValue, - context: context) - } else if - let xKeyframes = transformModel._positionX, - let yKeyframes = transformModel._positionY - { - try addAnimation( - for: .positionX, - keyframes: xKeyframes, - value: \.cgFloatValue, - context: context) - - try addAnimation( - for: .positionY, - keyframes: yKeyframes, - value: \.cgFloatValue, - context: context) - } else { - try context.logCompatibilityIssue(""" - `Transform` values must provide either `position` or `positionX` / `positionY` keyframes - """) - } - } - - @nonobjc - private func addAnchorPointAnimation( - from transformModel: TransformModel, - context: LayerAnimationContext) - throws - { - try addAnimation( - for: .anchorPoint, - keyframes: transformModel.anchorPoint, - value: { absoluteAnchorPoint in - guard bounds.width > 0, bounds.height > 0 else { - context.logger.assertionFailure("Size must be non-zero before an animation can be played") - return .zero - } - - // Lottie animation files express anchorPoint as an absolute point value, - // so we have to divide by the width/height of this layer to get the - // relative decimal values expected by Core Animation. - return CGPoint( - x: CGFloat(absoluteAnchorPoint.x) / bounds.width, - y: CGFloat(absoluteAnchorPoint.y) / bounds.height) - }, - context: context) - } - - @nonobjc - private func addScaleAnimations( - from transformModel: TransformModel, - context: LayerAnimationContext) - throws - { - try addAnimation( - for: .scaleX, - keyframes: transformModel.scale, - value: { scale in - // Lottie animation files express scale as a numerical percentage value - // (e.g. 50%, 100%, 200%) so we divide by 100 to get the decimal values - // expected by Core Animation (e.g. 0.5, 1.0, 2.0). - // - Negative `scale.x` values aren't applied correctly by Core Animation. - // This appears to be because we animate `transform.scale.x` and `transform.scale.y` - // as separate `CAKeyframeAnimation`s instead of using a single animation of `transform` itself. - // https://openradar.appspot.com/FB9862872 - // - To work around this, we set up a `rotationY` animation below - // to flip the view horizontally, which gives us the desired effect. - abs(CGFloat(scale.x) / 100) - }, - context: context) - - /// iOS 14 and earlier doesn't properly support rendering transforms with - /// negative `scale.x` values: https://github.com/airbnb/lottie-ios/issues/1882 - let osSupportsNegativeScaleValues: Bool = { - #if os(iOS) || os(tvOS) - if #available(iOS 15.0, tvOS 15.0, *) { - return true - } else { - return false - } - #else - // We'll assume this works correctly on macOS until told otherwise - return true - #endif - }() - - lazy var hasNegativeXScaleValues = transformModel.scale.keyframes.contains(where: { $0.value.x < 0 }) - - // When `scale.x` is negative, we have to rotate the view - // half way around the y axis to flip it horizontally. - // - We don't do this in snapshot tests because it breaks the tests - // in surprising ways that don't happen at runtime. Definitely not ideal. - // - This isn't supported on iOS 14 and earlier either, so we have to - // log a compatibility error on devices running older OSs. - if TestHelpers.snapshotTestsAreRunning { - if hasNegativeXScaleValues { - context.logger.warn(""" - Negative `scale.x` values are not displayed correctly in snapshot tests - """) - } - } else { - if !osSupportsNegativeScaleValues, hasNegativeXScaleValues { - try context.logCompatibilityIssue(""" - iOS 14 and earlier does not support rendering negative `scale.x` values - """) - } - - try addAnimation( - for: .rotationY, - keyframes: transformModel.scale, - value: { scale in - if scale.x < 0 { - return .pi - } else { - return 0 - } - }, - context: context) - } - - try addAnimation( - for: .scaleY, - keyframes: transformModel.scale, - value: { scale in - // Lottie animation files express scale as a numerical percentage value - // (e.g. 50%, 100%, 200%) so we divide by 100 to get the decimal values - // expected by Core Animation (e.g. 0.5, 1.0, 2.0). - // - Negative `scaleY` values are correctly applied (they flip the view - // vertically), so we don't have to apply an additional rotation animation - // like we do for `scaleX`. - CGFloat(scale.y) / 100 - }, - context: context) - } - - private func addRotationAnimations( - from transformModel: TransformModel, - context: LayerAnimationContext) - throws - { - let containsXRotationValues = transformModel.rotationX.keyframes.contains(where: { $0.value.cgFloatValue != 0 }) - let containsYRotationValues = transformModel.rotationY.keyframes.contains(where: { $0.value.cgFloatValue != 0 }) - - // When `rotation.x` or `rotation.y` is used, it doesn't render property in test snapshots - // but do renders correctly on the simulator / device - if TestHelpers.snapshotTestsAreRunning { - if containsXRotationValues { - context.logger.warn(""" - `rotation.x` values are not displayed correctly in snapshot tests - """) - } - - if containsYRotationValues { - context.logger.warn(""" - `rotation.y` values are not displayed correctly in snapshot tests - """) - } - } - - // Lottie animation files express rotation in degrees - // (e.g. 90º, 180º, 360º) so we covert to radians to get the - // values expected by Core Animation (e.g. π/2, π, 2π) - - try addAnimation( - for: .rotationX, - keyframes: transformModel.rotationX, - value: { rotationDegrees in - rotationDegrees.cgFloatValue * .pi / 180 - }, - context: context) - - try addAnimation( - for: .rotationY, - keyframes: transformModel.rotationY, - value: { rotationDegrees in - rotationDegrees.cgFloatValue * .pi / 180 - }, - context: context) - - try addAnimation( - for: .rotationZ, - keyframes: transformModel.rotationZ, - value: { rotationDegrees in - // Lottie animation files express rotation in degrees - // (e.g. 90º, 180º, 360º) so we covert to radians to get the - // values expected by Core Animation (e.g. π/2, π, 2π) - rotationDegrees.cgFloatValue * .pi / 180 - }, - context: context) - } - - /// Adds an animation for the entire `transform` key by combining all of the - /// position / size / rotation / skew animations into a single set of keyframes. - /// This is necessary when there's a skew animation, since skew can only - /// be applied via a transform. - private func addCombinedTransformAnimation( - for transformModel: ShapeTransform, - context: LayerAnimationContext) - throws - { - let combinedTransformKeyframes = Keyframes.combined( - transformModel.anchor, - transformModel.position, - transformModel.scale, - transformModel.rotationX, - transformModel.rotationY, - transformModel.rotationZ, - transformModel.skew, - transformModel.skewAxis, - makeCombinedResult: { anchor, position, scale, rotationX, rotationY, rotationZ, skew, skewAxis in - CATransform3D.makeTransform( - anchor: anchor.pointValue, - position: position.pointValue, - scale: scale.sizeValue, - rotationX: rotationX.cgFloatValue, - rotationY: rotationY.cgFloatValue, - rotationZ: rotationZ.cgFloatValue, - skew: skew.cgFloatValue, - skewAxis: skewAxis.cgFloatValue) - }) - - try addAnimation( - for: .transform, - keyframes: combinedTransformKeyframes, - value: { $0 }, - context: context) - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/VisibilityAnimation.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/VisibilityAnimation.swift deleted file mode 100644 index 8d12356..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Animations/VisibilityAnimation.swift +++ /dev/null @@ -1,37 +0,0 @@ -// Created by Cal Stephens on 12/21/21. -// Copyright © 2021 Airbnb Inc. All rights reserved. - -import QuartzCore - -extension CALayer { - /// Adds an animation for the given `inTime` and `outTime` to this `CALayer` - @nonobjc - func addVisibilityAnimation( - inFrame: AnimationFrameTime, - outFrame: AnimationFrameTime, - context: LayerAnimationContext) - { - let animation = CAKeyframeAnimation(keyPath: #keyPath(isHidden)) - animation.calculationMode = .discrete - - animation.values = [ - true, // hidden, before `inFrame` - false, // visible - true, // hidden, after `outFrame` - ] - - // From the documentation of `keyTimes`: - // - If the calculationMode is set to discrete, the first value in the array - // must be 0.0 and the last value must be 1.0. The array should have one more - // entry than appears in the values array. For example, if there are two values, - // there should be three key times. - animation.keyTimes = [ - NSNumber(value: 0.0), - NSNumber(value: max(Double(context.progressTime(for: inFrame)), 0)), - NSNumber(value: min(Double(context.progressTime(for: outFrame)), 1)), - NSNumber(value: 1.0), - ] - - add(animation, timedWith: context) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/CompatibilityTracker.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/CompatibilityTracker.swift deleted file mode 100644 index ce7e097..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/CompatibilityTracker.swift +++ /dev/null @@ -1,130 +0,0 @@ -// Created by Cal Stephens on 5/4/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -// MARK: - CompatibilityIssue - -/// A compatibility issue that was encountered while setting up an animation with the Core Animation engine -struct CompatibilityIssue: CustomStringConvertible { - let message: String - let context: String - - var description: String { - "[\(context)] \(message)" - } -} - -// MARK: - CompatibilityTracker - -/// A type that tracks whether or not an animation is compatible with the Core Animation engine -final class CompatibilityTracker { - - // MARK: Lifecycle - - init(mode: Mode, logger: LottieLogger) { - self.mode = mode - self.logger = logger - } - - // MARK: Internal - - /// How compatibility issues should be handled - enum Mode { - /// When a compatibility issue is encountered, an error will be thrown immediately, - /// aborting the animation setup process as soon as possible. - case abort - - /// When a compatibility issue is encountered, it is stored in `CompatibilityTracker.issues` - case track - } - - enum Error: Swift.Error { - case encounteredCompatibilityIssue(CompatibilityIssue) - } - - /// Records a compatibility issue that will be reported according to `CompatibilityTracker.Mode` - func logIssue(message: String, context: String) throws { - logger.assert(!context.isEmpty, "Compatibility issue context is unexpectedly empty") - - let issue = CompatibilityIssue( - // Compatibility messages are usually written in source files using multi-line strings, - // but converting them to be a single line makes it easier to read the ultimate log output. - message: message.replacingOccurrences(of: "\n", with: " "), - context: context) - - switch mode { - case .abort: - throw CompatibilityTracker.Error.encounteredCompatibilityIssue(issue) - case .track: - issues.append(issue) - } - } - - /// Asserts that a condition is true, otherwise logs a compatibility issue that will be reported - /// according to `CompatibilityTracker.Mode` - func assert( - _ condition: Bool, - _ message: @autoclosure () -> String, - context: @autoclosure () -> String) - throws - { - if !condition { - try logIssue(message: message(), context: context()) - } - } - - /// Reports the compatibility issues that were recorded when setting up the animation, - /// and clears the set of tracked issues. - func reportCompatibilityIssues(_ handler: ([CompatibilityIssue]) -> Void) { - handler(issues) - issues = [] - } - - // MARK: Private - - private let mode: Mode - private let logger: LottieLogger - - /// Compatibility issues encountered while setting up the animation - private var issues = [CompatibilityIssue]() - -} - -// MARK: - CompatibilityTrackerProviding - -protocol CompatibilityTrackerProviding { - var compatibilityTracker: CompatibilityTracker { get } - var compatibilityIssueContext: String { get } -} - -extension CompatibilityTrackerProviding { - /// Records a compatibility issue that will be reported according to `CompatibilityTracker.Mode` - func logCompatibilityIssue(_ message: String) throws { - try compatibilityTracker.logIssue(message: message, context: compatibilityIssueContext) - } - - /// Asserts that a condition is true, otherwise logs a compatibility issue that will be reported - /// according to `CompatibilityTracker.Mode` - func compatibilityAssert( - _ condition: Bool, - _ message: @autoclosure () -> String) - throws - { - try compatibilityTracker.assert(condition, message(), context: compatibilityIssueContext) - } -} - -// MARK: - LayerContext + CompatibilityTrackerProviding - -extension LayerContext: CompatibilityTrackerProviding { - var compatibilityIssueContext: String { - layerName - } -} - -// MARK: - LayerAnimationContext + CompatibilityTrackerProviding - -extension LayerAnimationContext: CompatibilityTrackerProviding { - var compatibilityIssueContext: String { - currentKeypath.fullPath - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/CoreAnimationLayer.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/CoreAnimationLayer.swift deleted file mode 100644 index f0b5897..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/CoreAnimationLayer.swift +++ /dev/null @@ -1,545 +0,0 @@ -// Created by Cal Stephens on 12/13/21. -// Copyright © 2021 Airbnb Inc. All rights reserved. - -import Foundation -import QuartzCore - -// MARK: - CoreAnimationLayer - -/// The root `CALayer` of the Core Animation rendering engine -final class CoreAnimationLayer: BaseAnimationLayer { - - // MARK: Lifecycle - - /// Initializes a `CALayer` that renders the given animation using `CAAnimation`s. - /// - This initializer is throwing, but will only throw when using - /// `CompatibilityTracker.Mode.abort`. - init( - animation: LottieAnimation, - imageProvider: AnimationImageProvider, - textProvider: AnimationTextProvider, - fontProvider: AnimationFontProvider, - maskAnimationToBounds: Bool, - compatibilityTrackerMode: CompatibilityTracker.Mode, - logger: LottieLogger) - throws - { - self.animation = animation - self.imageProvider = imageProvider - self.textProvider = textProvider - self.fontProvider = fontProvider - self.logger = logger - compatibilityTracker = CompatibilityTracker(mode: compatibilityTrackerMode, logger: logger) - valueProviderStore = ValueProviderStore(logger: logger) - super.init() - masksToBounds = maskAnimationToBounds - setup() - try setupChildLayers() - } - - /// Called by CoreAnimation to create a shadow copy of this layer - /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - override init(layer: Any) { - guard let typedLayer = layer as? Self else { - fatalError("init(layer:) incorrectly called with \(type(of: layer))") - } - - animation = typedLayer.animation - currentAnimationConfiguration = typedLayer.currentAnimationConfiguration - imageProvider = typedLayer.imageProvider - textProvider = typedLayer.textProvider - fontProvider = typedLayer.fontProvider - didSetUpAnimation = typedLayer.didSetUpAnimation - compatibilityTracker = typedLayer.compatibilityTracker - logger = typedLayer.logger - valueProviderStore = typedLayer.valueProviderStore - super.init(layer: typedLayer) - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - // MARK: Internal - - /// Timing-related configuration to apply to this layer's child `CAAnimation`s - /// - This is effectively a configurable subset of `CAMediaTiming` - struct CAMediaTimingConfiguration: Equatable { - var autoreverses = false - var repeatCount: Float = 0 - var speed: Float = 1 - var timeOffset: TimeInterval = 0 - } - - enum PlaybackState: Equatable { - /// The animation is has started playing, and may still be playing. - /// - When animating with a finite duration (e.g. `playOnce`), playback - /// state will still be `playing` when the animation completes. - /// To check if the animation is currently playing, prefer `isAnimationPlaying`. - case playing - /// The animation is statically displaying a specific frame - case paused(frame: AnimationFrameTime) - } - - /// Configuration used by the `playAnimation` method - struct AnimationConfiguration: Equatable { - var animationContext: AnimationContext - var timingConfiguration: CAMediaTimingConfiguration - var recordHierarchyKeypath: ((String) -> Void)? - - static func ==(_ lhs: AnimationConfiguration, _ rhs: AnimationConfiguration) -> Bool { - lhs.animationContext == rhs.animationContext - && lhs.timingConfiguration == rhs.timingConfiguration - && ((lhs.recordHierarchyKeypath == nil) == (rhs.recordHierarchyKeypath == nil)) - } - } - - /// The parent `LottieAnimationView` that manages this layer - weak var animationView: LottieAnimationView? - - /// A closure that is called after this layer sets up its animation. - /// If the animation setup was unsuccessful and encountered compatibility issues, - /// those issues are included in this call. - var didSetUpAnimation: (([CompatibilityIssue]) -> Void)? - - /// The `AnimationImageProvider` that `ImageLayer`s use to retrieve images, - /// referenced by name in the animation json. - var imageProvider: AnimationImageProvider { - didSet { reloadImages() } - } - - /// The `AnimationTextProvider` that `TextLayer`'s use to retrieve texts, - /// that they should use to render their text context - var textProvider: AnimationTextProvider { - didSet { - // We need to rebuild the current animation after updating the text provider, - // since this is used in `TextLayer.setupAnimations(context:)` - rebuildCurrentAnimation() - } - } - - /// The `FontProvider` that `TextLayer`s use to retrieve the `CTFont` - /// that they should use to render their text content - var fontProvider: AnimationFontProvider { - didSet { reloadFonts() } - } - - /// Queues the animation with the given timing configuration - /// to begin playing at the next `display()` call. - /// - This batches together animations so that even if `playAnimation` - /// is called multiple times in the same run loop cycle, the animation - /// will only be set up a single time. - func playAnimation( - configuration: AnimationConfiguration, - playbackState: PlaybackState = .playing) - { - pendingAnimationConfiguration = ( - animationConfiguration: configuration, - playbackState: playbackState) - - setNeedsDisplay() - } - - override func layoutSublayers() { - super.layoutSublayers() - - // If no animation has been set up yet, display the first frame - // now that the layer hierarchy has been setup and laid out - if - pendingAnimationConfiguration == nil, - currentAnimationConfiguration == nil, - bounds.size != .zero - { - currentFrame = animation.frameTime(forProgress: animationProgress) - } - } - - override func display() { - // We intentionally don't call `super.display()`, since this layer - // doesn't directly render any content. - // - This fixes an issue where certain animations would unexpectedly - // allocate a very large amount of memory (400mb+). - // - Alternatively this layer could subclass `CATransformLayer`, - // but this causes Core Animation to emit unnecessary logs. - if var pendingAnimationConfiguration = pendingAnimationConfiguration { - pendingAnimationConfigurationModification?(&pendingAnimationConfiguration.animationConfiguration) - pendingAnimationConfigurationModification = nil - self.pendingAnimationConfiguration = nil - - do { - try setupAnimation(for: pendingAnimationConfiguration.animationConfiguration) - } catch { - if case CompatibilityTracker.Error.encounteredCompatibilityIssue(let compatibilityIssue) = error { - // Even though the animation setup failed, we still update the layer's playback state - // so it can be read by the parent `LottieAnimationView` when handling this error - currentPlaybackState = pendingAnimationConfiguration.playbackState - - didSetUpAnimation?([compatibilityIssue]) - return - } - } - - currentPlaybackState = pendingAnimationConfiguration.playbackState - - compatibilityTracker.reportCompatibilityIssues { compatibilityIssues in - didSetUpAnimation?(compatibilityIssues) - } - } - } - - // MARK: Private - - /// The configuration for the most recent animation which has been - /// queued by calling `playAnimation` but not yet actually set up - private var pendingAnimationConfiguration: ( - animationConfiguration: AnimationConfiguration, - playbackState: PlaybackState)? - - /// A modification that should be applied to the next animation configuration - private var pendingAnimationConfigurationModification: ((inout AnimationConfiguration) -> Void)? - - /// Configuration for the animation that is currently setup in this layer - private var currentAnimationConfiguration: AnimationConfiguration? - - /// The current progress of the placeholder `CAAnimation`, - /// which is also the realtime animation progress of this layer's animation - @objc private var animationProgress: CGFloat = 0 - - private let animation: LottieAnimation - private let valueProviderStore: ValueProviderStore - private let compatibilityTracker: CompatibilityTracker - private let logger: LottieLogger - - /// The current playback state of the animation that is displayed in this layer - private var currentPlaybackState: PlaybackState? { - didSet { - guard playbackState != oldValue else { return } - - switch playbackState { - case .playing, nil: - timeOffset = 0 - case .paused(let frame): - timeOffset = animation.time(forFrame: frame) - } - } - } - - /// The current or pending playback state of the animation displayed in this layer - private var playbackState: PlaybackState? { - pendingAnimationConfiguration?.playbackState ?? currentPlaybackState - } - - /// Context used when setting up and configuring sublayers - private var layerContext: LayerContext { - LayerContext( - animation: animation, - imageProvider: imageProvider, - textProvider: textProvider, - fontProvider: fontProvider, - compatibilityTracker: compatibilityTracker, - layerName: "root layer") - } - - private func setup() { - bounds = animation.bounds - } - - private func setupChildLayers() throws { - try setupLayerHierarchy( - for: animation.layers, - context: layerContext) - } - - /// Immediately builds and begins playing `CAAnimation`s for each sublayer - private func setupAnimation(for configuration: AnimationConfiguration) throws { - // Remove any existing animations from the layer hierarchy - removeAnimations() - - currentAnimationConfiguration = configuration - - let layerContext = LayerAnimationContext( - animation: animation, - timingConfiguration: configuration.timingConfiguration, - startFrame: configuration.animationContext.playFrom, - endFrame: configuration.animationContext.playTo, - valueProviderStore: valueProviderStore, - compatibilityTracker: compatibilityTracker, - logger: logger, - currentKeypath: AnimationKeypath(keys: []), - textProvider: textProvider, - recordHierarchyKeypath: configuration.recordHierarchyKeypath) - - // Perform a layout pass if necessary so all of the sublayers - // have the most up-to-date sizing information - layoutIfNeeded() - - // Set the speed of this layer, which will be inherited - // by all sublayers and their animations. - // - This is required to support scrubbing with a speed of 0 - speed = configuration.timingConfiguration.speed - - // Setup a placeholder animation to let us track the realtime animation progress - setupPlaceholderAnimation(context: layerContext) - - // Set up the new animations with the current `TimingConfiguration` - for animationLayer in sublayers ?? [] { - try (animationLayer as? AnimationLayer)?.setupAnimations(context: layerContext) - } - } - - /// Sets up a placeholder `CABasicAnimation` that tracks the current - /// progress of this animation (between 0 and 1). This lets us provide - /// realtime animation progress via `self.currentFrame`. - private func setupPlaceholderAnimation(context: LayerAnimationContext) { - let animationProgressTracker = CABasicAnimation(keyPath: #keyPath(animationProgress)) - animationProgressTracker.fromValue = 0 - animationProgressTracker.toValue = 1 - - let timedProgressAnimation = animationProgressTracker.timed(with: context, for: self) - timedProgressAnimation.delegate = currentAnimationConfiguration?.animationContext.closure - - // Remove the progress animation once complete so we know when the animation - // has finished playing (if it doesn't loop infinitely) - timedProgressAnimation.isRemovedOnCompletion = true - - add(timedProgressAnimation, forKey: #keyPath(animationProgress)) - } - - // Removes the current `CAAnimation`s, and rebuilds new animations - // using the same configuration as the previous animations. - private func rebuildCurrentAnimation() { - guard - // Don't replace any pending animations that are queued to begin - // on the next run loop cycle, since an existing pending animation - // will cause the animation to be rebuilt anyway. - pendingAnimationConfiguration == nil - else { return } - - if isAnimationPlaying == true { - animationView?.updateInFlightAnimation() - } else { - let currentFrame = currentFrame - removeAnimations() - self.currentFrame = currentFrame - } - } - -} - -// MARK: RootAnimationLayer - -extension CoreAnimationLayer: RootAnimationLayer { - - var primaryAnimationKey: AnimationKey { - .specific(#keyPath(animationProgress)) - } - - /// Whether or not the animation is currently playing. - /// - Handles case where CAAnimations with a finite duration animation (e.g. `playOnce`) - /// have finished playing but still present on this layer. - var isAnimationPlaying: Bool? { - switch pendingAnimationConfiguration?.playbackState { - case .playing: - return true - case .paused: - return false - case nil: - switch playbackState { - case .playing: - return animation(forKey: #keyPath(animationProgress)) != nil - case nil, .paused: - return false - } - } - } - - /// The current frame of the animation being displayed, - /// accounting for the realtime progress of any active CAAnimations. - var currentFrame: AnimationFrameTime { - get { - switch playbackState { - case .paused(let frame): - return frame - - case .playing, nil: - // When in the `playing` state, the animation is either actively playing - // or is completed on the final frame of a non-repeating animation. - // When a non-repeating animation is complete, `animation(forKey: #keyPath(animationProgress))` - // is no longer present and the Core-Animation-managed `animationProgress` value is just 0. - // In that case, since the animation is complete, we just return the final frame that was played to. - let animationCurrentlyPlaying = animation(forKey: #keyPath(animationProgress)) != nil - - if !animationCurrentlyPlaying, let configuration = currentAnimationConfiguration { - return configuration.animationContext.playTo - } else { - return animation.frameTime(forProgress: (presentation() ?? self).animationProgress) - } - } - } - set { - // We can display a specific frame of the animation by setting - // `timeOffset` of this layer. This requires setting up the layer hierarchy - // with a specific configuration (speed=0, etc) at least once. But if - // the layer hierarchy is already set up correctly, we can update the - // `timeOffset` very cheaply. - let requiredAnimationConfiguration = AnimationConfiguration( - animationContext: AnimationContext( - playFrom: animation.startFrame, - playTo: animation.endFrame, - closure: nil), - timingConfiguration: CAMediaTimingConfiguration(speed: 0)) - - if - pendingAnimationConfiguration == nil, - currentAnimationConfiguration == requiredAnimationConfiguration - { - currentPlaybackState = .paused(frame: newValue) - } - - else { - playAnimation( - configuration: requiredAnimationConfiguration, - playbackState: .paused(frame: newValue)) - } - } - } - - var renderScale: CGFloat { - get { contentsScale } - set { - contentsScale = newValue - - for sublayer in allSublayers { - sublayer.contentsScale = newValue - } - } - } - - var respectAnimationFrameRate: Bool { - get { false } - set { - logger.assertionFailure(""" - The Core Animation rendering engine currently doesn't support `respectAnimationFrameRate`) - """) - } - } - - var _animationLayers: [CALayer] { - (sublayers ?? []).filter { $0 is AnimationLayer } - } - - func reloadImages() { - // When the image provider changes, we have to update all `ImageLayer`s - // so they can query the most up-to-date image from the new image provider. - for sublayer in allSublayers { - if let imageLayer = sublayer as? ImageLayer { - imageLayer.setupImage(context: layerContext) - } - } - } - - func reloadFonts() { - // When the text provider changes, we have to update all `TextLayer`s - // so they can query the most up-to-date font from the new font provider. - for sublayer in allSublayers { - if let textLayer = sublayer as? TextLayer { - try? textLayer.configureRenderLayer(with: layerContext) - } - } - } - - func forceDisplayUpdate() { - // Unimplemented / unused - } - - func logHierarchyKeypaths() { - for keypath in allHierarchyKeypaths() { - logger.info(keypath) - } - } - - func allHierarchyKeypaths() -> [String] { - guard pendingAnimationConfiguration?.animationConfiguration ?? currentAnimationConfiguration != nil else { - logger.info("Cannot log hierarchy keypaths until animation has been set up at least once") - return [] - } - - logger.info("Lottie: Rebuilding animation with hierarchy keypath logging enabled") - - var allAnimationKeypaths = [String]() - pendingAnimationConfigurationModification = { configuration in - configuration.recordHierarchyKeypath = { keypath in - allAnimationKeypaths.append(keypath) - } - } - - rebuildCurrentAnimation() - displayIfNeeded() - - return allAnimationKeypaths - } - - func setValueProvider(_ valueProvider: AnyValueProvider, keypath: AnimationKeypath) { - valueProviderStore.setValueProvider(valueProvider, keypath: keypath) - - // We need to rebuild the current animation after registering a value provider, - // since any existing `CAAnimation`s could now be out of date. - rebuildCurrentAnimation() - } - - func getValue(for _: AnimationKeypath, atFrame _: AnimationFrameTime?) -> Any? { - logger.assertionFailure(""" - The Core Animation rendering engine doesn't support querying values for individual frames - """) - return nil - } - - func getOriginalValue(for _: AnimationKeypath, atFrame _: AnimationFrameTime?) -> Any? { - logger.assertionFailure(""" - The Core Animation rendering engine doesn't support querying values for individual frames - """) - return nil - } - - func layer(for _: AnimationKeypath) -> CALayer? { - logger.assertionFailure(""" - The Core Animation rendering engine doesn't support retrieving `CALayer`s by keypath - """) - return nil - } - - func animatorNodes(for _: AnimationKeypath) -> [AnimatorNode]? { - logger.assertionFailure(""" - The Core Animation rendering engine does not use `AnimatorNode`s - """) - return nil - } - - func removeAnimations() { - currentAnimationConfiguration = nil - currentPlaybackState = nil - removeAllAnimations() - - for sublayer in allSublayers { - sublayer.removeAllAnimations() - } - } - -} - -// MARK: - CALayer + allSublayers - -extension CALayer { - /// All of the layers in the layer tree that are descendants from this later - @nonobjc - var allSublayers: [CALayer] { - var allSublayers: [CALayer] = [] - - for sublayer in sublayers ?? [] { - allSublayers.append(sublayer) - allSublayers.append(contentsOf: sublayer.allSublayers) - } - - return allSublayers - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Extensions/CALayer+fillBounds.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Extensions/CALayer+fillBounds.swift deleted file mode 100644 index 5b0baf1..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Extensions/CALayer+fillBounds.swift +++ /dev/null @@ -1,35 +0,0 @@ -// Created by Cal Stephens on 12/15/21. -// Copyright © 2021 Airbnb Inc. All rights reserved. - -import QuartzCore - -// MARK: - CALayer + fillBoundsOfSuperlayer - -extension CALayer { - /// Updates the `bounds` of this layer to fill the bounds of its `superlayer` - /// without setting `frame` (which is not permitted if the layer can rotate) - @nonobjc - func fillBoundsOfSuperlayer() { - guard let superlayer = superlayer else { return } - - if let customLayerLayer = self as? CustomLayoutLayer { - customLayerLayer.layout(superlayerBounds: superlayer.bounds) - } - - else { - // By default the `anchorPoint` of a layer is `CGPoint(x: 0.5, y: 0.5)`. - // Setting it to `.zero` makes the layer have the same coordinate space - // as its superlayer, which lets use use `superlayer.bounds` directly. - anchorPoint = .zero - - bounds = superlayer.bounds - } - } -} - -// MARK: - CustomLayoutLayer - -/// A `CALayer` that sets a custom `bounds` and `anchorPoint` relative to its superlayer -protocol CustomLayoutLayer: CALayer { - func layout(superlayerBounds: CGRect) -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Extensions/KeyframeGroup+exactlyOneKeyframe.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Extensions/KeyframeGroup+exactlyOneKeyframe.swift deleted file mode 100644 index 627d742..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Extensions/KeyframeGroup+exactlyOneKeyframe.swift +++ /dev/null @@ -1,29 +0,0 @@ -// Created by Cal Stephens on 1/11/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -// MARK: - KeyframeGroup + exactlyOneKeyframe - -extension KeyframeGroup { - /// Retrieves the first `Keyframe` from this group, - /// and asserts that there are not any extra keyframes that would be ignored - /// - This should only be used in cases where it's fundamentally not possible to - /// support animating a given property (e.g. if Core Animation itself doesn't - /// support the property). - func exactlyOneKeyframe( - context: CompatibilityTrackerProviding, - description: String, - fileID _: StaticString = #fileID, - line _: UInt = #line) - throws - -> T - { - try context.compatibilityAssert( - keyframes.count == 1, - """ - The Core Animation rendering engine does not support animating multiple keyframes - for \(description) values, due to limitations of Core Animation. - """) - - return keyframes[0].value - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Extensions/Keyframes+combined.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Extensions/Keyframes+combined.swift deleted file mode 100644 index c57f769..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Extensions/Keyframes+combined.swift +++ /dev/null @@ -1,260 +0,0 @@ -// Created by Cal Stephens on 1/28/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -// MARK: - Keyframes - -enum Keyframes { - - // MARK: Internal - - /// Combines the given keyframe groups of `Keyframe`s into a single keyframe group of of `Keyframe<[T]>`s - /// - If all of the `KeyframeGroup`s have the exact same animation timing, the keyframes are merged - /// - Otherwise, the keyframes are manually interpolated at each frame in the animation - static func combined(_ allGroups: [KeyframeGroup]) -> KeyframeGroup<[T]> - where T: AnyInterpolatable - { - Keyframes.combined(allGroups, makeCombinedResult: { untypedValues in - untypedValues.compactMap { $0 as? T } - }) - } - - /// Combines the given keyframe groups of `Keyframe`s into a single keyframe group of of `Keyframe<[T]>`s - /// - If all of the `KeyframeGroup`s have the exact same animation timing, the keyframes are merged - /// - Otherwise, the keyframes are manually interpolated at each frame in the animation - static func combined( - _ k1: KeyframeGroup, - _ k2: KeyframeGroup, - makeCombinedResult: (T1, T2) throws -> CombinedResult) - rethrows - -> KeyframeGroup - where T1: AnyInterpolatable, T2: AnyInterpolatable - { - try Keyframes.combined( - [k1, k2], - makeCombinedResult: { untypedValues in - guard - let t1 = untypedValues[0] as? T1, - let t2 = untypedValues[1] as? T2 - else { return nil } - - return try makeCombinedResult(t1, t2) - }) - } - - /// Combines the given keyframe groups of `Keyframe`s into a single keyframe group of of `Keyframe<[T]>`s - /// - If all of the `KeyframeGroup`s have the exact same animation timing, the keyframes are merged - /// - Otherwise, the keyframes are manually interpolated at each frame in the animation - static func combined( - _ k1: KeyframeGroup, - _ k2: KeyframeGroup, - _ k3: KeyframeGroup, - makeCombinedResult: (T1, T2, T3) -> CombinedResult) - -> KeyframeGroup - where T1: AnyInterpolatable, T2: AnyInterpolatable, T3: AnyInterpolatable - { - Keyframes.combined( - [k1, k2, k3], - makeCombinedResult: { untypedValues in - guard - let t1 = untypedValues[0] as? T1, - let t2 = untypedValues[1] as? T2, - let t3 = untypedValues[2] as? T3 - else { return nil } - - return makeCombinedResult(t1, t2, t3) - }) - } - - /// Combines the given keyframe groups of `Keyframe`s into a single keyframe group of of `Keyframe<[T]>`s - /// - If all of the `KeyframeGroup`s have the exact same animation timing, the keyframes are merged - /// - Otherwise, the keyframes are manually interpolated at each frame in the animation - static func combined( - _ k1: KeyframeGroup, - _ k2: KeyframeGroup, - _ k3: KeyframeGroup, - _ k4: KeyframeGroup, - _ k5: KeyframeGroup, - _ k6: KeyframeGroup, - _ k7: KeyframeGroup, - makeCombinedResult: (T1, T2, T3, T4, T5, T6, T7) -> CombinedResult) - -> KeyframeGroup - where T1: AnyInterpolatable, T2: AnyInterpolatable, T3: AnyInterpolatable, T4: AnyInterpolatable, - T5: AnyInterpolatable, T6: AnyInterpolatable, T7: AnyInterpolatable - { - Keyframes.combined( - [k1, k2, k3, k4, k5, k6, k7], - makeCombinedResult: { untypedValues in - guard - let t1 = untypedValues[0] as? T1, - let t2 = untypedValues[1] as? T2, - let t3 = untypedValues[2] as? T3, - let t4 = untypedValues[3] as? T4, - let t5 = untypedValues[4] as? T5, - let t6 = untypedValues[5] as? T6, - let t7 = untypedValues[6] as? T7 - else { return nil } - - return makeCombinedResult(t1, t2, t3, t4, t5, t6, t7) - }) - } - - /// Combines the given keyframe groups of `Keyframe`s into a single keyframe group of of `Keyframe<[T]>`s - /// - If all of the `KeyframeGroup`s have the exact same animation timing, the keyframes are merged - /// - Otherwise, the keyframes are manually interpolated at each frame in the animation - static func combined( - _ k1: KeyframeGroup, - _ k2: KeyframeGroup, - _ k3: KeyframeGroup, - _ k4: KeyframeGroup, - _ k5: KeyframeGroup, - _ k6: KeyframeGroup, - _ k7: KeyframeGroup, - _ k8: KeyframeGroup, - makeCombinedResult: (T1, T2, T3, T4, T5, T6, T7, T8) -> CombinedResult) - -> KeyframeGroup - where T1: AnyInterpolatable, T2: AnyInterpolatable, T3: AnyInterpolatable, T4: AnyInterpolatable, - T5: AnyInterpolatable, T6: AnyInterpolatable, T7: AnyInterpolatable, T8: AnyInterpolatable - { - Keyframes.combined( - [k1, k2, k3, k4, k5, k6, k7, k8], - makeCombinedResult: { untypedValues in - guard - let t1 = untypedValues[0] as? T1, - let t2 = untypedValues[1] as? T2, - let t3 = untypedValues[2] as? T3, - let t4 = untypedValues[3] as? T4, - let t5 = untypedValues[4] as? T5, - let t6 = untypedValues[5] as? T6, - let t7 = untypedValues[6] as? T7, - let t8 = untypedValues[7] as? T8 - else { return nil } - - return makeCombinedResult(t1, t2, t3, t4, t5, t6, t7, t8) - }) - } - - // MARK: Private - - /// Combines the given `[KeyframeGroup]` of `Keyframe`s into a single `KeyframeGroup` of `Keyframe`s - /// - If all of the `KeyframeGroup`s have the exact same animation timing, the keyframes are merged - /// - Otherwise, the keyframes are manually interpolated at each frame in the animation - /// - /// `makeCombinedResult` is a closure that takes an array of keyframe values (with the exact same length as `AnyKeyframeGroup`), - /// casts them to the expected type, and combined them into the final resulting keyframe. - private static func combined( - _ allGroups: [AnyKeyframeGroup], - makeCombinedResult: ([Any]) throws -> CombinedResult?) - rethrows - -> KeyframeGroup - { - let untypedGroups = allGroups.map { $0.untyped } - - // Animations with no timing information (e.g. with just a single keyframe) - // can be trivially combined with any other set of keyframes, so we don't need - // to check those. - let animatingKeyframes = untypedGroups.filter { $0.keyframes.count > 1 } - - guard - !allGroups.isEmpty, - animatingKeyframes.allSatisfy({ $0.hasSameTimingParameters(as: animatingKeyframes[0]) }) - else { - // If the keyframes don't all share the same timing information, - // we have to interpolate the value at each individual frame - return try Keyframes.manuallyInterpolated(allGroups, makeCombinedResult: makeCombinedResult) - } - - var combinedKeyframes = ContiguousArray>() - let baseKeyframes = (animatingKeyframes.first ?? untypedGroups[0]).keyframes - - for index in baseKeyframes.indices { - let baseKeyframe = baseKeyframes[index] - let untypedValues = untypedGroups.map { $0.valueForCombinedKeyframes(at: index) } - - if let combinedValue = try makeCombinedResult(untypedValues) { - combinedKeyframes.append(baseKeyframe.withValue(combinedValue)) - } else { - LottieLogger.shared.assertionFailure(""" - Failed to cast untyped keyframe values to expected type. This is an internal error. - """) - } - } - - return KeyframeGroup(keyframes: combinedKeyframes) - } - - private static func manuallyInterpolated( - _ allGroups: [AnyKeyframeGroup], - makeCombinedResult: ([Any]) throws -> CombinedResult?) - rethrows - -> KeyframeGroup - { - let untypedGroups = allGroups.map { $0.untyped } - let untypedInterpolators = allGroups.map { $0.interpolator } - - let times = untypedGroups.flatMap { $0.keyframes.map { $0.time } } - - let minimumTime = times.min() ?? 0 - let maximumTime = times.max() ?? 0 - let animationLocalTimeRange = Int(minimumTime)...Int(maximumTime) - - let interpolatedKeyframes = try animationLocalTimeRange.compactMap { localTime -> Keyframe? in - let interpolatedValues = untypedInterpolators.map { interpolator in - interpolator.value(frame: AnimationFrameTime(localTime)) - } - - guard let combinedResult = try makeCombinedResult(interpolatedValues) else { - LottieLogger.shared.assertionFailure(""" - Failed to cast untyped keyframe values to expected type. This is an internal error. - """) - return nil - } - - return Keyframe( - value: combinedResult, - time: AnimationFrameTime(localTime)) - } - - return KeyframeGroup(keyframes: ContiguousArray(interpolatedKeyframes)) - } - -} - -extension KeyframeGroup { - /// Whether or not all of the keyframes in this `KeyframeGroup` have the same - /// timing parameters as the corresponding keyframe in the other given `KeyframeGroup` - func hasSameTimingParameters(as other: KeyframeGroup) -> Bool { - guard keyframes.count == other.keyframes.count else { - return false - } - - return zip(keyframes, other.keyframes).allSatisfy { - $0.hasSameTimingParameters(as: $1) - } - } -} - -extension Keyframe { - /// Whether or not this keyframe has the same timing parameters as the given keyframe, - /// excluding `spatialInTangent` and `spatialOutTangent`. - fileprivate func hasSameTimingParameters(as other: Keyframe) -> Bool { - time == other.time - && isHold == other.isHold - && inTangent == other.inTangent - && outTangent == other.outTangent - // We intentionally don't compare spatial in/out tangents, - // since those values are only used in very specific cases - // (animating the x/y position of a layer), which aren't ever - // combined in this way. - } -} - -extension KeyframeGroup { - /// The value to use for a combined set of keyframes, for the given index - fileprivate func valueForCombinedKeyframes(at index: Int) -> T { - if keyframes.count == 1 { - return keyframes[0].value - } else { - return keyframes[index].value - } - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/AnimationLayer.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/AnimationLayer.swift deleted file mode 100644 index 693b42c..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/AnimationLayer.swift +++ /dev/null @@ -1,86 +0,0 @@ -// Created by Cal Stephens on 12/14/21. -// Copyright © 2021 Airbnb Inc. All rights reserved. - -import QuartzCore - -// MARK: - AnimationLayer - -/// A type of `CALayer` that can be used in a Lottie animation -/// - Layers backed by a `LayerModel` subclass should subclass `BaseCompositionLayer` -protocol AnimationLayer: CALayer { - /// Instructs this layer to setup its `CAAnimation`s - /// using the given `LayerAnimationContext` - func setupAnimations(context: LayerAnimationContext) throws -} - -// MARK: - LayerAnimationContext - -// Context describing the timing parameters of the current animation -struct LayerAnimationContext { - /// The animation being played - let animation: LottieAnimation - - /// The timing configuration that should be applied to `CAAnimation`s - let timingConfiguration: CoreAnimationLayer.CAMediaTimingConfiguration - - /// The absolute frame number that this animation begins at - let startFrame: AnimationFrameTime - - /// The absolute frame number that this animation ends at - let endFrame: AnimationFrameTime - - /// The set of custom Value Providers applied to this animation - let valueProviderStore: ValueProviderStore - - /// Information about whether or not an animation is compatible with the Core Animation engine - let compatibilityTracker: CompatibilityTracker - - /// The logger that should be used for assertions and warnings - let logger: LottieLogger - - /// The AnimationKeypath represented by the current layer - var currentKeypath: AnimationKeypath - - /// The `AnimationTextProvider` - var textProvider: AnimationTextProvider - - /// Records the given animation keypath so it can be logged or collected into a list - /// - Used for `CoreAnimationLayer.logHierarchyKeypaths()` and `allHierarchyKeypaths()` - var recordHierarchyKeypath: ((String) -> Void)? - - /// A closure that remaps the given frame in the child layer's local time to a frame - /// in the animation's overall global time - private(set) var timeRemapping: ((AnimationFrameTime) -> AnimationFrameTime) = { $0 } - - /// Adds the given component string to the `AnimationKeypath` stored - /// that describes the current path being configured by this context value - func addingKeypathComponent(_ component: String) -> LayerAnimationContext { - var context = self - context.currentKeypath.keys.append(component) - return context - } - - /// The `AnimationProgressTime` for the given `AnimationFrameTime` within this layer, - /// accounting for the `timeRemapping` applied to this layer - func progressTime(for frame: AnimationFrameTime) -> AnimationProgressTime { - animation.progressTime(forFrame: timeRemapping(frame), clamped: false) - } - - /// The real-time `TimeInterval` for the given `AnimationFrameTime` within this layer, - /// accounting for the `timeRemapping` applied to this layer - func time(for frame: AnimationFrameTime) -> TimeInterval { - animation.time(forFrame: timeRemapping(frame)) - } - - /// Chains an additional `timeRemapping` closure onto this layer context - func withTimeRemapping( - _ additionalTimeRemapping: @escaping (AnimationFrameTime) -> AnimationFrameTime) - -> LayerAnimationContext - { - var copy = self - copy.timeRemapping = { [existingTimeRemapping = timeRemapping] time in - existingTimeRemapping(additionalTimeRemapping(time)) - } - return copy - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/BaseAnimationLayer.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/BaseAnimationLayer.swift deleted file mode 100644 index 06248b2..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/BaseAnimationLayer.swift +++ /dev/null @@ -1,33 +0,0 @@ -// Created by Cal Stephens on 1/27/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -import QuartzCore - -/// A base `CALayer` that manages the frame and animations -/// of its `sublayers` and `mask` -class BaseAnimationLayer: CALayer, AnimationLayer { - - // MARK: Internal - - override func layoutSublayers() { - super.layoutSublayers() - - for sublayer in managedSublayers { - sublayer.fillBoundsOfSuperlayer() - } - } - - func setupAnimations(context: LayerAnimationContext) throws { - for childAnimationLayer in managedSublayers { - try (childAnimationLayer as? AnimationLayer)?.setupAnimations(context: context) - } - } - - // MARK: Private - - /// All of the sublayers managed by this container - private var managedSublayers: [CALayer] { - (sublayers ?? []) + [mask].compactMap { $0 } - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/BaseCompositionLayer.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/BaseCompositionLayer.swift deleted file mode 100644 index bdbbda9..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/BaseCompositionLayer.swift +++ /dev/null @@ -1,101 +0,0 @@ -// Created by Cal Stephens on 12/20/21. -// Copyright © 2021 Airbnb Inc. All rights reserved. - -import QuartzCore - -// MARK: - BaseCompositionLayer - -/// The base type of `AnimationLayer` that can contain other `AnimationLayer`s -class BaseCompositionLayer: BaseAnimationLayer { - - // MARK: Lifecycle - - init(layerModel: LayerModel) { - baseLayerModel = layerModel - super.init() - - setupSublayers() - compositingFilter = layerModel.blendMode.filterName - name = layerModel.name - contentsLayer.name = "\(layerModel.name) (Content)" - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - /// Called by CoreAnimation to create a shadow copy of this layer - /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - override init(layer: Any) { - guard let typedLayer = layer as? Self else { - fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))") - } - - baseLayerModel = typedLayer.baseLayerModel - super.init(layer: typedLayer) - } - - // MARK: Internal - - /// The layer that content / sublayers should be rendered in. - /// This is the layer that transform animations are applied to. - let contentsLayer = BaseAnimationLayer() - - /// Whether or not this layer render should render any visible content - var renderLayerContents: Bool { true } - - /// Sets up the base `LayerModel` animations for this layer, - /// and all child `AnimationLayer`s. - /// - Can be overridden by subclasses, which much call `super`. - override func setupAnimations(context: LayerAnimationContext) throws { - let layerContext = context.addingKeypathComponent(baseLayerModel.name) - let childContext = renderLayerContents ? layerContext : context - - try setupLayerAnimations(context: layerContext) - try setupChildAnimations(context: childContext) - } - - func setupLayerAnimations(context: LayerAnimationContext) throws { - let transformContext = context.addingKeypathComponent("Transform") - - try contentsLayer.addTransformAnimations(for: baseLayerModel.transform, context: transformContext) - - if renderLayerContents { - try contentsLayer.addOpacityAnimation(for: baseLayerModel.transform, context: transformContext) - - contentsLayer.addVisibilityAnimation( - inFrame: CGFloat(baseLayerModel.inFrame), - outFrame: CGFloat(baseLayerModel.outFrame), - context: context) - } - } - - func setupChildAnimations(context: LayerAnimationContext) throws { - try super.setupAnimations(context: context) - } - - override func addSublayer(_ layer: CALayer) { - if layer === contentsLayer { - super.addSublayer(contentsLayer) - } else { - contentsLayer.addSublayer(layer) - } - } - - // MARK: Private - - private let baseLayerModel: LayerModel - - private func setupSublayers() { - addSublayer(contentsLayer) - - if - renderLayerContents, - let masks = baseLayerModel.masks?.filter({ $0.mode != .none }), - !masks.isEmpty - { - contentsLayer.mask = MaskCompositionLayer(masks: masks) - } - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/CALayer+setupLayerHierarchy.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/CALayer+setupLayerHierarchy.swift deleted file mode 100644 index 445d1df..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/CALayer+setupLayerHierarchy.swift +++ /dev/null @@ -1,169 +0,0 @@ -// Created by Cal Stephens on 1/11/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -import QuartzCore - -extension CALayer { - - // MARK: Internal - - /// Sets up an `AnimationLayer` / `CALayer` hierarchy in this layer, - /// using the given list of layers. - @nonobjc - func setupLayerHierarchy( - for layers: [LayerModel], - context: LayerContext) - throws - { - // A `LottieAnimation`'s `LayerModel`s are listed from front to back, - // but `CALayer.sublayers` are listed from back to front. - // We reverse the layer ordering to match what Core Animation expects. - // The final view hierarchy must display the layers in this exact order. - let layersInZAxisOrder = layers.reversed() - - let layersByIndex = Dictionary(grouping: layersInZAxisOrder, by: \.index) - .compactMapValues(\.first) - - /// Layers specify a `parent` layer. Child layers inherit the `transform` of their parent. - /// - We can't add the child as a sublayer of the parent `CALayer`, since that would - /// break the ordering specified in `layersInZAxisOrder`. - /// - Instead, we create an invisible `TransformLayer` to handle the parent - /// transform animations, and add the child layer to that `TransformLayer`. - func makeParentTransformLayer( - childLayerModel: LayerModel, - childLayer: CALayer, - name: (LayerModel) -> String) - -> CALayer - { - guard - let parentIndex = childLayerModel.parent, - let parentLayerModel = layersByIndex[parentIndex] - else { return childLayer } - - let parentLayer = TransformLayer(layerModel: parentLayerModel) - parentLayer.name = name(parentLayerModel) - parentLayer.addSublayer(childLayer) - - return makeParentTransformLayer( - childLayerModel: parentLayerModel, - childLayer: parentLayer, - name: name) - } - - // Create an `AnimationLayer` for each `LayerModel` - for (layerModel, mask) in try layersInZAxisOrder.pairedLayersAndMasks() { - guard let layer = try layerModel.makeAnimationLayer(context: context) else { - continue - } - - // If this layer has a `parent`, we create an invisible `TransformLayer` - // to handle displaying / animating the parent transform. - let parentTransformLayer = makeParentTransformLayer( - childLayerModel: layerModel, - childLayer: layer, - name: { parentLayerModel in - "\(layerModel.name) (parent, \(parentLayerModel.name))" - }) - - // Create the `mask` layer for this layer, if it has a `MatteType` - if - let mask = mask, - let maskLayer = try maskLayer(for: mask.model, type: mask.matteType, context: context) - { - let maskParentTransformLayer = makeParentTransformLayer( - childLayerModel: mask.model, - childLayer: maskLayer, - name: { parentLayerModel in - "\(mask.model.name) (mask of \(layerModel.name)) (parent, \(parentLayerModel.name))" - }) - - // Set up a parent container to host both the layer - // and its mask in the same coordinate space - let maskContainer = BaseAnimationLayer() - maskContainer.name = "\(layerModel.name) (parent, masked)" - maskContainer.addSublayer(parentTransformLayer) - - // Core Animation will silently fail to apply a mask if a `mask` layer - // itself _also_ has a `mask`. As a workaround, we can wrap this layer's - // mask in an additional container layer which never has its own `mask`. - let additionalMaskParent = BaseAnimationLayer() - additionalMaskParent.addSublayer(maskParentTransformLayer) - maskContainer.mask = additionalMaskParent - - addSublayer(maskContainer) - } - - else { - addSublayer(parentTransformLayer) - } - } - } - - // MARK: Fileprivate - - /// Creates a mask `CALayer` from the given matte layer model, using the `MatteType` - /// from the layer that is being masked. - fileprivate func maskLayer( - for matteLayerModel: LayerModel, - type: MatteType, - context: LayerContext) - throws -> CALayer? - { - switch type { - case .add: - return try matteLayerModel.makeAnimationLayer(context: context) - - case .invert: - guard let maskLayer = try matteLayerModel.makeAnimationLayer(context: context) else { - return nil - } - - // We can invert the mask layer by having a large solid black layer with the - // given mask layer subtracted out using the `xor` blend mode. When applied to the - // layer being masked, this creates an inverted mask where only areas _outside_ - // of the mask layer are visible. - // https://developer.apple.com/documentation/coregraphics/cgblendmode/xor - // - The inverted mask is supposed to expand infinitely around the shape, - // so we use `InfiniteOpaqueAnimationLayer` - let base = InfiniteOpaqueAnimationLayer() - base.backgroundColor = .rgb(0, 0, 0) - base.addSublayer(maskLayer) - maskLayer.compositingFilter = "xor" - return base - - case .none, .unknown: - return nil - } - } - -} - -extension Collection where Element == LayerModel { - /// Pairs each `LayerModel` within this array with - /// a `LayerModel` to use as its mask, if applicable - /// based on the layer's `MatteType` configuration. - /// - Assumes the layers are sorted in z-axis order. - fileprivate func pairedLayersAndMasks() throws - -> [(layer: LayerModel, mask: (model: LayerModel, matteType: MatteType)?)] - { - var layersAndMasks = [(layer: LayerModel, mask: (model: LayerModel, matteType: MatteType)?)]() - var unprocessedLayers = reversed() - - while let layer = unprocessedLayers.popLast() { - /// If a layer has a `MatteType`, then the next layer will be used as its `mask` - if - let matteType = layer.matte, - matteType != .none, - let maskLayer = unprocessedLayers.popLast() - { - layersAndMasks.append((layer: layer, mask: (model: maskLayer, matteType: matteType))) - } - - else { - layersAndMasks.append((layer: layer, mask: nil)) - } - } - - return layersAndMasks - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/GradientRenderLayer.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/GradientRenderLayer.swift deleted file mode 100644 index cb2fe48..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/GradientRenderLayer.swift +++ /dev/null @@ -1,97 +0,0 @@ -// Created by Cal Stephens on 1/10/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -import QuartzCore - -// MARK: - GradientRenderLayer - -/// A `CAGradientLayer` subclass used to render a gradient _outside_ the normal layer bounds -/// -/// - `GradientFill.startPoint` and `GradientFill.endPoint` are expressed -/// with respect to the `bounds` of the `ShapeItemLayer`. -/// -/// - The gradient itself is supposed to be rendered infinitely in all directions -/// (e.g. including outside of `bounds`). This is because `ShapeItemLayer` paths -/// don't necessarily sit within the layer's `bounds`. -/// -/// - To support this, `GradientRenderLayer` tracks a `gradientReferenceBounds` -/// that `startPoint` / `endPoint` are calculated relative to. -/// The _actual_ `bounds` of this layer is padded by a large amount so that -/// the gradient can be drawn outside of the `gradientReferenceBounds`. -/// -final class GradientRenderLayer: CAGradientLayer { - - // MARK: Internal - - /// The reference bounds within this layer that the gradient's - /// `startPoint` and `endPoint` should be calculated relative to - var gradientReferenceBounds: CGRect = .zero { - didSet { - if oldValue != gradientReferenceBounds { - updateLayout() - } - } - } - - /// Converts the given `CGPoint` within `gradientReferenceBounds` - /// to a percentage value relative to the full `bounds` of this layer - /// - This converts absolute `startPoint` and `endPoint` values into - /// the percent-based values expected by Core Animation, - /// with respect to the custom bounds geometry used by this layer type. - func percentBasedPointInBounds(from referencePoint: CGPoint) -> CGPoint { - guard bounds.width > 0, bounds.height > 0 else { - LottieLogger.shared.assertionFailure("Size must be non-zero before an animation can be played") - return .zero - } - - let pointInBounds = CGPoint( - x: referencePoint.x + CALayer.veryLargeLayerPadding, - y: referencePoint.y + CALayer.veryLargeLayerPadding) - - return CGPoint( - x: CGFloat(pointInBounds.x) / bounds.width, - y: CGFloat(pointInBounds.y) / bounds.height) - } - - // MARK: Private - - private func updateLayout() { - anchorPoint = .zero - - bounds = CGRect( - x: gradientReferenceBounds.origin.x, - y: gradientReferenceBounds.origin.y, - width: CALayer.veryLargeLayerPadding + gradientReferenceBounds.width + CALayer.veryLargeLayerPadding, - height: CALayer.veryLargeLayerPadding + gradientReferenceBounds.height + CALayer.veryLargeLayerPadding) - - // Align the center of this layer to be at the center point of its parent layer - let superlayerSize = superlayer?.frame.size ?? gradientReferenceBounds.size - - transform = CATransform3DMakeTranslation( - (superlayerSize.width - bounds.width) / 2, - (superlayerSize.height - bounds.height) / 2, - 0) - } - -} - -// MARK: CustomLayoutLayer - -extension GradientRenderLayer: CustomLayoutLayer { - func layout(superlayerBounds: CGRect) { - gradientReferenceBounds = superlayerBounds - - if let gradientMask = mask as? GradientRenderLayer { - gradientMask.layout(superlayerBounds: superlayerBounds) - } - } -} - -extension CALayer { - /// Extra padding to add around layers that should be very large or "infinite" in size. - /// Examples include `GradientRenderLayer` and `InfiniteOpaqueAnimationLayer`. - /// - This specific value is arbitrary and can be increased if necessary. - /// - Theoretically this should be "infinite", to match the behavior of - /// `CGContext.drawLinearGradient` with `[.drawsAfterEndLocation, .drawsBeforeStartLocation]` etc. - static let veryLargeLayerPadding: CGFloat = 10_000 -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/ImageLayer.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/ImageLayer.swift deleted file mode 100644 index 7939b43..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/ImageLayer.swift +++ /dev/null @@ -1,79 +0,0 @@ -// Created by Cal Stephens on 1/10/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -import QuartzCore - -// MARK: - ImageLayer - -/// The `CALayer` type responsible for rendering `ImageLayerModel`s -final class ImageLayer: BaseCompositionLayer { - - // MARK: Lifecycle - - init( - imageLayer: ImageLayerModel, - context: LayerContext) - { - self.imageLayer = imageLayer - super.init(layerModel: imageLayer) - setupImage(context: context) - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - /// Called by CoreAnimation to create a shadow copy of this layer - /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - override init(layer: Any) { - guard let typedLayer = layer as? Self else { - fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))") - } - - imageLayer = typedLayer.imageLayer - super.init(layer: typedLayer) - } - - // MARK: Internal - - func setupImage(context: LayerContext) { - guard - let imageAsset = context.animation.assetLibrary?.imageAssets[imageLayer.referenceID], - let image = context.imageProvider.imageForAsset(asset: imageAsset) - else { - self.imageAsset = nil - contentsLayer.contents = nil - return - } - - self.imageAsset = imageAsset - contentsLayer.contents = image - setNeedsLayout() - } - - // MARK: Private - - private let imageLayer: ImageLayerModel - private var imageAsset: ImageAsset? - -} - -// MARK: CustomLayoutLayer - -extension ImageLayer: CustomLayoutLayer { - func layout(superlayerBounds: CGRect) { - anchorPoint = .zero - - guard let imageAsset = imageAsset else { - bounds = superlayerBounds - return - } - - // Image layers specifically need to use the size of the image itself - bounds = CGRect( - x: superlayerBounds.origin.x, - y: superlayerBounds.origin.y, - width: CGFloat(imageAsset.width), - height: CGFloat(imageAsset.height)) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/InfiniteOpaqueAnimationLayer.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/InfiniteOpaqueAnimationLayer.swift deleted file mode 100644 index 4549fea..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/InfiniteOpaqueAnimationLayer.swift +++ /dev/null @@ -1,56 +0,0 @@ -// Created by Cal Stephens on 10/10/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -import QuartzCore - -// MARK: - ExpandedAnimationLayer - -/// A `BaseAnimationLayer` subclass that renders its background color -/// as if the layer is infinitely large, without affecting its bounds -/// or the bounds of its sublayers -final class InfiniteOpaqueAnimationLayer: BaseAnimationLayer { - - // MARK: Lifecycle - - override init() { - super.init() - addSublayer(additionalPaddingLayer) - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - /// Called by CoreAnimation to create a shadow copy of this layer - /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - override init(layer: Any) { - super.init(layer: layer) - } - - // MARK: Internal - - override func layoutSublayers() { - super.layoutSublayers() - - masksToBounds = false - additionalPaddingLayer.backgroundColor = backgroundColor - - // Scale `additionalPaddingLayer` to be larger than this layer - // by `additionalPadding` at each size, and centered at the center - // of this layer. Since `additionalPadding` is very large, this has - // the affect of making `additionalPaddingLayer` appear infinite. - let scaleRatioX = (bounds.width + (CALayer.veryLargeLayerPadding * 2)) / bounds.width - let scaleRatioY = (bounds.height + (CALayer.veryLargeLayerPadding * 2)) / bounds.height - - additionalPaddingLayer.transform = CATransform3DScale( - CATransform3DMakeTranslation(-CALayer.veryLargeLayerPadding, -CALayer.veryLargeLayerPadding, 0), - scaleRatioX, - scaleRatioY, - 1) - } - - // MARK: Private - - private let additionalPaddingLayer = CALayer() - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/LayerModel+makeAnimationLayer.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/LayerModel+makeAnimationLayer.swift deleted file mode 100644 index b584a71..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/LayerModel+makeAnimationLayer.swift +++ /dev/null @@ -1,65 +0,0 @@ -// Created by Cal Stephens on 12/20/21. -// Copyright © 2021 Airbnb Inc. All rights reserved. - -import QuartzCore - -// MARK: - LayerContext - -/// Context available when constructing an `AnimationLayer` -struct LayerContext { - let animation: LottieAnimation - let imageProvider: AnimationImageProvider - let textProvider: AnimationTextProvider - let fontProvider: AnimationFontProvider - let compatibilityTracker: CompatibilityTracker - var layerName: String - - func forLayer(_ layer: LayerModel) -> LayerContext { - var context = self - context.layerName = layer.name - return context - } -} - -// MARK: - LayerModel + makeAnimationLayer - -extension LayerModel { - /// Constructs an `AnimationLayer` / `CALayer` that represents this `LayerModel` - func makeAnimationLayer(context: LayerContext) throws -> BaseCompositionLayer? { - let context = context.forLayer(self) - - if hidden { - return TransformLayer(layerModel: self) - } - - switch (type, self) { - case (.precomp, let preCompLayerModel as PreCompLayerModel): - let preCompLayer = PreCompLayer(preCompLayer: preCompLayerModel) - try preCompLayer.setup(context: context) - return preCompLayer - - case (.solid, let solidLayerModel as SolidLayerModel): - return SolidLayer(solidLayerModel) - - case (.shape, let shapeLayerModel as ShapeLayerModel): - return try ShapeLayer(shapeLayer: shapeLayerModel, context: context) - - case (.image, let imageLayerModel as ImageLayerModel): - return ImageLayer(imageLayer: imageLayerModel, context: context) - - case (.text, let textLayerModel as TextLayerModel): - return try TextLayer(textLayerModel: textLayerModel, context: context) - - case (.null, _): - return TransformLayer(layerModel: self) - - default: - try context.logCompatibilityIssue(""" - Unexpected layer type combination ("\(type)" and "\(Swift.type(of: self))") - """) - - return nil - } - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/MaskCompositionLayer.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/MaskCompositionLayer.swift deleted file mode 100644 index d032ab5..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/MaskCompositionLayer.swift +++ /dev/null @@ -1,138 +0,0 @@ -// Created by Cal Stephens on 1/6/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -import QuartzCore - -// MARK: - MaskCompositionLayer - -/// The CALayer type responsible for rendering the `Mask` of a `BaseCompositionLayer` -final class MaskCompositionLayer: CALayer { - - // MARK: Lifecycle - - init(masks: [Mask]) { - maskLayers = masks.map(MaskLayer.init(mask:)) - super.init() - - var containerLayer = BaseAnimationLayer() - var firstObject = true - for maskLayer in maskLayers { - if maskLayer.maskModel.mode.usableMode == .none { - continue - } else if maskLayer.maskModel.mode.usableMode == .add || firstObject { - firstObject = false - containerLayer.addSublayer(maskLayer) - } else { - containerLayer.mask = maskLayer - let newContainer = BaseAnimationLayer() - newContainer.addSublayer(containerLayer) - containerLayer = newContainer - } - } - - addSublayer(containerLayer) - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - /// Called by CoreAnimation to create a shadow copy of this layer - /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - override init(layer: Any) { - guard let typedLayer = layer as? Self else { - fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))") - } - - maskLayers = typedLayer.maskLayers - super.init(layer: typedLayer) - } - - // MARK: Internal - - override func layoutSublayers() { - super.layoutSublayers() - - for sublayer in sublayers ?? [] { - sublayer.fillBoundsOfSuperlayer() - } - } - - // MARK: Private - - private let maskLayers: [MaskLayer] - -} - -// MARK: AnimationLayer - -extension MaskCompositionLayer: AnimationLayer { - func setupAnimations(context: LayerAnimationContext) throws { - for maskLayer in maskLayers { - try maskLayer.setupAnimations(context: context) - } - } -} - -// MARK: MaskCompositionLayer.MaskLayer - -extension MaskCompositionLayer { - final class MaskLayer: CAShapeLayer { - - // MARK: Lifecycle - - init(mask: Mask) { - maskModel = mask - super.init() - - fillRule = .evenOdd - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - /// Called by CoreAnimation to create a shadow copy of this layer - /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - override init(layer: Any) { - guard let typedLayer = layer as? Self else { - fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))") - } - - maskModel = typedLayer.maskModel - super.init(layer: typedLayer) - } - - // MARK: Internal - - let maskModel: Mask - - } -} - -// MARK: - MaskCompositionLayer.MaskLayer + AnimationLayer - -extension MaskCompositionLayer.MaskLayer: AnimationLayer { - func setupAnimations(context: LayerAnimationContext) throws { - let shouldInvertMask = (maskModel.mode.usableMode == .subtract && !maskModel.inverted) - || (maskModel.mode.usableMode == .add && maskModel.inverted) - - try addAnimations( - for: maskModel.shape, - context: context, - transformPath: { maskPath in - // If the mask is using `MaskMode.subtract` or has `inverted: true`, - // we have to invert the area filled by the path. We can do that by - // drawing a rectangle, and then adding a path (which is subtracted - // from the rectangle based on the .evenOdd fill mode). - if shouldInvertMask { - let path = CGMutablePath() - path.addRect(.veryLargeRect) - path.addPath(maskPath) - return path - } else { - return maskPath - } - }) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/PreCompLayer.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/PreCompLayer.swift deleted file mode 100644 index 2fe6caa..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/PreCompLayer.swift +++ /dev/null @@ -1,139 +0,0 @@ -// Created by Cal Stephens on 12/14/21. -// Copyright © 2021 Airbnb Inc. All rights reserved. - -import QuartzCore - -// MARK: - PreCompLayer - -/// The `CALayer` type responsible for rendering `PreCompLayerModel`s -final class PreCompLayer: BaseCompositionLayer { - - // MARK: Lifecycle - - init(preCompLayer: PreCompLayerModel) { - self.preCompLayer = preCompLayer - super.init(layerModel: preCompLayer) - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - /// Called by CoreAnimation to create a shadow copy of this layer - /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - override init(layer: Any) { - guard let typedLayer = layer as? Self else { - fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))") - } - - preCompLayer = typedLayer.preCompLayer - timeRemappingInterpolator = typedLayer.timeRemappingInterpolator - super.init(layer: typedLayer) - } - - // MARK: Internal - - /// Post-init setup for `PreCompLayer`s. - /// Should always be called after `PreCompLayer.init(preCompLayer:)`. - /// - /// This is a workaround for a hard-to-reproduce crash that was - /// triggered when `PreCompLayer.init` was called reentantly. We didn't - /// have any consistent repro steps for this crash (it happened 100% of - /// the time for some testers, and 0% of the time for other testers), - /// but moving this code out of `PreCompLayer.init` does seem to fix it. - /// - /// The stack trace looked like: - /// - `_os_unfair_lock_recursive_abort` - /// - `-[CALayerAccessibility__UIKit__QuartzCore dealloc]` - /// - `PreCompLayer.__allocating_init(preCompLayer:context:)` <- reentrant init call - /// - ... - /// - `CALayer.setupLayerHierarchy(for:context:)` - /// - `PreCompLayer.init(preCompLayer:context:)` - /// - func setup(context: LayerContext) throws { - if let timeRemappingKeyframes = preCompLayer.timeRemapping { - timeRemappingInterpolator = try .timeRemapping(keyframes: timeRemappingKeyframes, context: context) - } else { - timeRemappingInterpolator = nil - } - - try setupLayerHierarchy( - for: context.animation.assetLibrary?.precompAssets[preCompLayer.referenceID]?.layers ?? [], - context: context) - } - - override func setupAnimations(context: LayerAnimationContext) throws { - var context = context - context = context.addingKeypathComponent(preCompLayer.name) - try setupLayerAnimations(context: context) - - // Precomp layers can adjust the local time of their child layers (relative to the - // animation's global time) via `timeRemapping` or a custom `startTime` / `timeStretch` - let contextForChildren = context.withTimeRemapping { [preCompLayer, timeRemappingInterpolator] layerLocalFrame in - if let timeRemappingInterpolator = timeRemappingInterpolator { - return timeRemappingInterpolator.value(frame: layerLocalFrame) as? AnimationFrameTime ?? layerLocalFrame - } else { - return (layerLocalFrame * AnimationFrameTime(preCompLayer.timeStretch)) + AnimationFrameTime(preCompLayer.startTime) - } - } - - try setupChildAnimations(context: contextForChildren) - } - - // MARK: Private - - private let preCompLayer: PreCompLayerModel - private var timeRemappingInterpolator: KeyframeInterpolator? - -} - -// MARK: CustomLayoutLayer - -extension PreCompLayer: CustomLayoutLayer { - func layout(superlayerBounds: CGRect) { - anchorPoint = .zero - - // Pre-comp layers use a size specified in the layer model, - // and clip the composition to that bounds - bounds = CGRect( - x: superlayerBounds.origin.x, - y: superlayerBounds.origin.y, - width: CGFloat(preCompLayer.width), - height: CGFloat(preCompLayer.height)) - - contentsLayer.masksToBounds = true - } -} - -extension KeyframeInterpolator where ValueType == AnimationFrameTime { - /// A `KeyframeInterpolator` for the given `timeRemapping` keyframes - static func timeRemapping( - keyframes timeRemappingKeyframes: KeyframeGroup, - context: LayerContext) - throws -> KeyframeInterpolator - { - try context.logCompatibilityIssue(""" - The Core Animation rendering engine partially supports time remapping keyframes, - but this is somewhat experimental and has some known issues. Since it doesn't work - in all cases, we have to fall back to using the main thread engine when using - `RenderingEngineOption.automatic`. - """) - - // `timeRemapping` is a mapping from the animation's global time to the layer's local time. - // In the Core Animation engine, we need to perform the opposite calculation -- convert - // the layer's local time into the animation's global time. We can get this by inverting - // the time remapping, swapping the x axis (global time) and the y axis (local time). - let localTimeToGlobalTimeMapping = timeRemappingKeyframes.keyframes.map { keyframe in - Keyframe( - value: keyframe.time, - time: keyframe.value.cgFloatValue * CGFloat(context.animation.framerate), - isHold: keyframe.isHold, - inTangent: keyframe.inTangent, - outTangent: keyframe.outTangent, - spatialInTangent: keyframe.spatialInTangent, - spatialOutTangent: keyframe.spatialOutTangent) - } - - return KeyframeInterpolator(keyframes: .init(localTimeToGlobalTimeMapping)) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/RepeaterLayer.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/RepeaterLayer.swift deleted file mode 100644 index 4bb9e86..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/RepeaterLayer.swift +++ /dev/null @@ -1,96 +0,0 @@ -// Created by Cal Stephens on 8/1/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -import QuartzCore - -// MARK: - RepeaterLayer - -/// A layer that renders a child layer at some offset using a `Repeater` -final class RepeaterLayer: BaseAnimationLayer { - - // MARK: Lifecycle - - init(repeater: Repeater, childLayer: CALayer, index: Int) { - repeaterTransform = RepeaterTransform(repeater: repeater, index: index) - super.init() - addSublayer(childLayer) - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - /// Called by CoreAnimation to create a shadow copy of this layer - /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - override init(layer: Any) { - guard let typedLayer = layer as? Self else { - fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))") - } - - repeaterTransform = typedLayer.repeaterTransform - super.init(layer: typedLayer) - } - - // MARK: Internal - - override func setupAnimations(context: LayerAnimationContext) throws { - try super.setupAnimations(context: context) - try addTransformAnimations(for: repeaterTransform, context: context) - } - - // MARK: Private - - private let repeaterTransform: RepeaterTransform - -} - -// MARK: - RepeaterTransform - -/// A transform model created from a `Repeater` -private struct RepeaterTransform { - - // MARK: Lifecycle - - init(repeater: Repeater, index: Int) { - anchorPoint = repeater.anchorPoint - scale = repeater.scale - - rotationX = repeater.rotationX.map { rotation in - LottieVector1D(rotation.value * Double(index)) - } - - rotationY = repeater.rotationY.map { rotation in - LottieVector1D(rotation.value * Double(index)) - } - - rotationZ = repeater.rotationZ.map { rotation in - LottieVector1D(rotation.value * Double(index)) - } - - position = repeater.position.map { position in - LottieVector3D( - x: position.x * Double(index), - y: position.y * Double(index), - z: position.z * Double(index)) - } - } - - // MARK: Internal - - let anchorPoint: KeyframeGroup - let position: KeyframeGroup - let rotationX: KeyframeGroup - let rotationY: KeyframeGroup - let rotationZ: KeyframeGroup - - let scale: KeyframeGroup - -} - -// MARK: TransformModel - -extension RepeaterTransform: TransformModel { - var _position: KeyframeGroup? { position } - var _positionX: KeyframeGroup? { nil } - var _positionY: KeyframeGroup? { nil } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/ShapeItemLayer.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/ShapeItemLayer.swift deleted file mode 100644 index 6fd9398..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/ShapeItemLayer.swift +++ /dev/null @@ -1,344 +0,0 @@ -// Created by Cal Stephens on 12/13/21. -// Copyright © 2021 Airbnb Inc. All rights reserved. - -import QuartzCore - -// MARK: - ShapeItemLayer - -/// A CALayer type that renders an array of `[ShapeItem]`s, -/// from a `Group` in a `ShapeLayerModel`. -final class ShapeItemLayer: BaseAnimationLayer { - - // MARK: Lifecycle - - /// Initializes a `ShapeItemLayer` that renders a `Group` from a `ShapeLayerModel` - /// - Parameters: - /// - shape: The `ShapeItem` in this group that renders a `GGPath` - /// - otherItems: Other items in this group that affect the appearance of the shape - init(shape: Item, otherItems: [Item], context: LayerContext) throws { - self.shape = shape - self.otherItems = otherItems - - try context.compatibilityAssert( - shape.item.drawsCGPath, - "`ShapeItemLayer` must contain exactly one `ShapeItem` that draws a `GPPath`") - - try context.compatibilityAssert( - !otherItems.contains(where: { $0.item.drawsCGPath }), - "`ShapeItemLayer` must contain exactly one `ShapeItem` that draws a `GPPath`") - - super.init() - - setupLayerHierarchy() - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - /// Called by CoreAnimation to create a shadow copy of this layer - /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - override init(layer: Any) { - guard let typedLayer = layer as? Self else { - fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))") - } - - shape = typedLayer.shape - otherItems = typedLayer.otherItems - super.init(layer: typedLayer) - } - - // MARK: Internal - - /// An item that can be displayed by this layer - struct Item { - /// A `ShapeItem` that should be rendered by this layer - let item: ShapeItem - - /// The set of groups that this item descends from - /// - Due to the way `GroupLayer`s are setup, the original `ShapeItem` - /// hierarchy from the `ShapeLayer` data model may no longer exactly - /// match the hierarchy of `GroupLayer` / `ShapeItemLayer`s constructed - /// at runtime. Since animation keypaths need to match the original - /// structure of the `ShapeLayer` data model, we track that info here. - let groupPath: [String] - } - - override func setupAnimations(context: LayerAnimationContext) throws { - try super.setupAnimations(context: context) - - guard let sublayerConfiguration = sublayerConfiguration else { return } - - switch sublayerConfiguration.fill { - case .solidFill(let shapeLayer): - try setupSolidFillAnimations(shapeLayer: shapeLayer, context: context) - - case .gradientFill(let gradientLayers): - try setupGradientFillAnimations(layers: gradientLayers, context: context) - } - - if let gradientStrokeConfiguration = sublayerConfiguration.gradientStroke { - try setupGradientStrokeAnimations(layers: gradientStrokeConfiguration, context: context) - } - } - - // MARK: Private - - private struct GradientLayers { - /// The `CALayer` that renders the RGB components of the gradient - let gradientColorLayer: GradientRenderLayer - /// The `CALayer` that renders the alpha components of the gradient, - /// masking the `gradientColorLayer` - let gradientAlphaLayer: GradientRenderLayer? - /// The `CAShapeLayer` that clips the gradient layers to the expected shape - let shapeMaskLayer: CAShapeLayer - /// The top-most `CAShapeLayer` used to render `Stroke`s over the gradient if necessary - let overlayLayer: CAShapeLayer? - } - - /// The configuration of this layer's `fill` sublayers - private enum FillLayerConfiguration { - /// This layer displays a single `CAShapeLayer` - case solidFill(CAShapeLayer) - - /// This layer displays a `GradientRenderLayer` masked by a `CAShapeLayer`. - case gradientFill(GradientLayers) - } - - /// The `ShapeItem` in this group that renders a `GGPath` - private let shape: Item - - /// Other items in this group that affect the appearance of the shape - private let otherItems: [Item] - - /// The current configuration of this layer's sublayer(s) - private var sublayerConfiguration: (fill: FillLayerConfiguration, gradientStroke: GradientLayers?)? - - private func setupLayerHierarchy() { - // We have to build a different layer hierarchy depending on if - // we're rendering a gradient (a `CAGradientLayer` masked by a `CAShapeLayer`) - // or a solid shape (a simple `CAShapeLayer`). - let fillLayerConfiguration: FillLayerConfiguration - if let gradientFill = otherItems.first(GradientFill.self) { - fillLayerConfiguration = setupGradientFillLayerHierarchy(for: gradientFill) - } else { - fillLayerConfiguration = setupSolidFillLayerHierarchy() - } - - let gradientStrokeConfiguration: GradientLayers? - if let gradientStroke = otherItems.first(GradientStroke.self) { - gradientStrokeConfiguration = setupGradientStrokeLayerHierarchy(for: gradientStroke) - } else { - gradientStrokeConfiguration = nil - } - - sublayerConfiguration = (fillLayerConfiguration, gradientStrokeConfiguration) - } - - private func setupSolidFillLayerHierarchy() -> FillLayerConfiguration { - let shapeLayer = CAShapeLayer() - addSublayer(shapeLayer) - - // `CAShapeLayer.fillColor` defaults to black, so we have to - // nil out the background color if there isn't an expected fill color - if !otherItems.contains(where: { $0.item is Fill }) { - shapeLayer.fillColor = nil - } - - return .solidFill(shapeLayer) - } - - private func setupGradientFillLayerHierarchy( - for gradientFill: GradientFill) - -> FillLayerConfiguration - { - let container = BaseAnimationLayer() - let pathContainer = BaseAnimationLayer() - - let pathMask = CAShapeLayer() - pathMask.fillColor = .rgb(0, 0, 0) - pathContainer.mask = pathMask - - let rgbGradientLayer = GradientRenderLayer() - pathContainer.addSublayer(rgbGradientLayer) - container.addSublayer(pathContainer) - - let overlayLayer = CAShapeLayer() - overlayLayer.fillColor = nil - container.addSublayer(overlayLayer) - - addSublayer(container) - - let alphaGradientLayer: GradientRenderLayer? - if gradientFill.hasAlphaComponent { - alphaGradientLayer = GradientRenderLayer() - rgbGradientLayer.mask = alphaGradientLayer - } else { - alphaGradientLayer = nil - } - - return .gradientFill(GradientLayers( - gradientColorLayer: rgbGradientLayer, - gradientAlphaLayer: alphaGradientLayer, - shapeMaskLayer: pathMask, - overlayLayer: overlayLayer)) - } - - private func setupGradientStrokeLayerHierarchy( - for gradientStroke: GradientStroke) - -> GradientLayers - { - let container = BaseAnimationLayer() - - let pathMask = CAShapeLayer() - pathMask.fillColor = nil - pathMask.strokeColor = .rgb(0, 0, 0) - container.mask = pathMask - - let rgbGradientLayer = GradientRenderLayer() - container.addSublayer(rgbGradientLayer) - addSublayer(container) - - let alphaGradientLayer: GradientRenderLayer? - if gradientStroke.hasAlphaComponent { - alphaGradientLayer = GradientRenderLayer() - rgbGradientLayer.mask = alphaGradientLayer - } else { - alphaGradientLayer = nil - } - - return GradientLayers( - gradientColorLayer: rgbGradientLayer, - gradientAlphaLayer: alphaGradientLayer, - shapeMaskLayer: pathMask, - overlayLayer: nil) - } - - private func setupSolidFillAnimations( - shapeLayer: CAShapeLayer, - context: LayerAnimationContext) - throws - { - var trimPathMultiplier: PathMultiplier? = nil - if let (trim, context) = otherItems.first(Trim.self, where: { !$0.isEmpty }, context: context) { - trimPathMultiplier = try shapeLayer.addAnimations(for: trim, context: context) - - try context.compatibilityAssert( - otherItems.first(Fill.self) == nil, - """ - The Core Animation rendering engine doesn't currently support applying - trims to filled shapes (only stroked shapes). - """) - } - - try shapeLayer.addAnimations( - for: shape.item, - context: context.for(shape), - pathMultiplier: trimPathMultiplier ?? 1, - roundedCorners: otherItems.first(RoundedCorners.self)) - - if let (fill, context) = otherItems.first(Fill.self, context: context) { - try shapeLayer.addAnimations(for: fill, context: context) - } - - if let (stroke, context) = otherItems.first(Stroke.self, context: context) { - try shapeLayer.addStrokeAnimations(for: stroke, context: context) - } - } - - private func setupGradientFillAnimations( - layers: GradientLayers, - context: LayerAnimationContext) - throws - { - let pathLayers = [layers.shapeMaskLayer, layers.overlayLayer] - for pathLayer in pathLayers { - try pathLayer?.addAnimations( - for: shape.item, - context: context.for(shape), - pathMultiplier: 1, - roundedCorners: otherItems.first(RoundedCorners.self)) - } - - if let (gradientFill, context) = otherItems.first(GradientFill.self, context: context) { - layers.shapeMaskLayer.fillRule = gradientFill.fillRule.caFillRule - try layers.gradientColorLayer.addGradientAnimations(for: gradientFill, type: .rgb, context: context) - try layers.gradientAlphaLayer?.addGradientAnimations(for: gradientFill, type: .alpha, context: context) - } - - if let (stroke, context) = otherItems.first(Stroke.self, context: context) { - try layers.overlayLayer?.addStrokeAnimations(for: stroke, context: context) - } - } - - private func setupGradientStrokeAnimations( - layers: GradientLayers, - context: LayerAnimationContext) - throws - { - var trimPathMultiplier: PathMultiplier? = nil - if let (trim, context) = otherItems.first(Trim.self, context: context) { - trimPathMultiplier = try layers.shapeMaskLayer.addAnimations(for: trim, context: context) - } - - try layers.shapeMaskLayer.addAnimations( - for: shape.item, - context: context.for(shape), - pathMultiplier: trimPathMultiplier ?? 1, - roundedCorners: otherItems.first(RoundedCorners.self)) - - if let (gradientStroke, context) = otherItems.first(GradientStroke.self, context: context) { - try layers.gradientColorLayer.addGradientAnimations(for: gradientStroke, type: .rgb, context: context) - try layers.gradientAlphaLayer?.addGradientAnimations(for: gradientStroke, type: .alpha, context: context) - - try layers.shapeMaskLayer.addStrokeAnimations(for: gradientStroke, context: context) - } - } - -} - -// MARK: - [ShapeItem] helpers - -extension Array where Element == ShapeItemLayer.Item { - /// The first `ShapeItem` in this array of the given type - func first( - _: ItemType.Type, - where condition: (ItemType) -> Bool = { _ in true }, - context: LayerAnimationContext) - -> (item: ItemType, context: LayerAnimationContext)? - { - for item in self { - if let match = item.item as? ItemType, condition(match) { - return (match, context.for(item)) - } - } - - return nil - } - - /// The first `ShapeItem` in this array of the given type - func first(_: ItemType.Type) -> ItemType? { - for item in self { - if let match = item.item as? ItemType { - return match - } - } - - return nil - } -} - -extension LayerAnimationContext { - /// An updated `LayerAnimationContext` with the`AnimationKeypath` - /// that refers to this specific `ShapeItem`. - func `for`(_ item: ShapeItemLayer.Item) -> LayerAnimationContext { - var context = self - - for parentGroupName in item.groupPath { - context.currentKeypath.keys.append(parentGroupName) - } - - context.currentKeypath.keys.append(item.item.name) - return context - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/ShapeLayer.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/ShapeLayer.swift deleted file mode 100644 index 0449d57..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/ShapeLayer.swift +++ /dev/null @@ -1,497 +0,0 @@ -// Created by Cal Stephens on 12/14/21. -// Copyright © 2021 Airbnb Inc. All rights reserved. - -import QuartzCore - -// MARK: - ShapeLayer - -/// The CALayer type responsible for rendering `ShapeLayerModel`s -final class ShapeLayer: BaseCompositionLayer { - - // MARK: Lifecycle - - init(shapeLayer: ShapeLayerModel, context: LayerContext) throws { - self.shapeLayer = shapeLayer - super.init(layerModel: shapeLayer) - try setUpGroups(context: context) - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - /// Called by CoreAnimation to create a shadow copy of this layer - /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - override init(layer: Any) { - guard let typedLayer = layer as? Self else { - fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))") - } - - shapeLayer = typedLayer.shapeLayer - super.init(layer: typedLayer) - } - - // MARK: Private - - private let shapeLayer: ShapeLayerModel - - private func setUpGroups(context: LayerContext) throws { - // If the layer has a `Repeater`, the `Group`s are duplicated and offset - // based on the copy count of the repeater. - if let repeater = shapeLayer.items.first(where: { $0 is Repeater }) as? Repeater { - try setUpRepeater(repeater, context: context) - } else { - try setupGroups(from: shapeLayer.items, parentGroup: nil, parentGroupPath: [], context: context) - } - } - - private func setUpRepeater(_ repeater: Repeater, context: LayerContext) throws { - let items = shapeLayer.items.filter { !($0 is Repeater) } - let copyCount = Int(try repeater.copies.exactlyOneKeyframe(context: context, description: "repeater copies").value) - - for index in 0..`, - // this requires combining all of the path-drawing items into a single set of keyframes. - if - shapeRenderGroup.pathItems.count > 1, - // We currently only support this codepath for `Shape` items that directly contain bezier path keyframes. - // We could also support this for other path types like rectangles, ellipses, and polygons with more work. - shapeRenderGroup.pathItems.allSatisfy({ $0.item is Shape }), - // `Trim`s are currently only applied correctly using individual `ShapeItemLayer`s, - // because each path has to be trimmed separately. - !shapeRenderGroup.otherItems.contains(where: { $0.item is Trim }) - { - let allPathKeyframes = shapeRenderGroup.pathItems.compactMap { ($0.item as? Shape)?.path } - let combinedShape = CombinedShapeItem( - shapes: Keyframes.combined(allPathKeyframes), - name: group.name) - - let sublayer = try ShapeItemLayer( - shape: ShapeItemLayer.Item(item: combinedShape, groupPath: shapeRenderGroup.pathItems[0].groupPath), - otherItems: shapeRenderGroup.otherItems, - context: context) - - addSublayer(sublayer) - } - - // Otherwise, if each `ShapeItem` that draws a `GGPath` animates independently, - // we have to create a separate `ShapeItemLayer` for each one. This may render - // incorrectly if there are multiple paths that overlap with each other. - else { - for pathDrawingItem in shapeRenderGroup.pathItems { - let sublayer = try ShapeItemLayer( - shape: pathDrawingItem, - otherItems: shapeRenderGroup.otherItems, - context: context) - - addSublayer(sublayer) - } - } - } - } - -} - -extension CALayer { - /// Sets up `GroupLayer`s for each `Group` in the given list of `ShapeItem`s - /// - Each `Group` item becomes its own `GroupLayer` sublayer. - /// - Other `ShapeItem` are applied to all sublayers - fileprivate func setupGroups( - from items: [ShapeItem], - parentGroup: Group?, - parentGroupPath: [String], - context: LayerContext) - throws - { - let groupLayers = try makeGroupLayers( - from: items, - parentGroup: parentGroup, - parentGroupPath: parentGroupPath, - context: context) - - for groupLayer in groupLayers { - addSublayer(groupLayer) - } - } - - /// Creates a `GroupLayer` for each `Group` in the given list of `ShapeItem`s - /// - Each `Group` item becomes its own `GroupLayer` sublayer. - /// - Other `ShapeItem` are applied to all sublayers - fileprivate func makeGroupLayers( - from items: [ShapeItem], - parentGroup: Group?, - parentGroupPath: [String], - context: LayerContext) - throws -> [GroupLayer] - { - var (groupItems, otherItems) = items - .filter { !$0.hidden } - .grouped(by: { $0 is Group }) - - // Handle the top-level `shapeLayer.items` array. This is typically just a single `Group`, - // but in practice can be any combination of items. The implementation expects all path-drawing - // shape items to be managed by a `GroupLayer`, so if there's a top-level path item we - // have to create a placeholder group. - if parentGroup == nil, otherItems.contains(where: { $0.drawsCGPath }) { - groupItems = [Group(items: items, name: "")] - otherItems = [] - } - - // Any child items that wouldn't be included in a valid shape render group - // need to be applied to child groups (otherwise they'd be silently ignored). - let inheritedItemsForChildGroups = otherItems - .map { ShapeItemLayer.Item(item: $0, groupPath: parentGroupPath) } - .shapeRenderGroups(groupHasChildGroupsToInheritUnusedItems: !groupItems.isEmpty) - .unusedItems - - // Groups are listed from front to back, - // but `CALayer.sublayers` are listed from back to front. - let groupsInZAxisOrder = groupItems.reversed() - - return try groupsInZAxisOrder.compactMap { group in - guard let group = group as? Group else { return nil } - - var pathForChildren = parentGroupPath - if !group.name.isEmpty { - pathForChildren.append(group.name) - } - - let childItems = group.items - .filter { !$0.hidden } - .map { ShapeItemLayer.Item(item: $0, groupPath: pathForChildren) } - - // Some shape item properties are affected by scaling (e.g. stroke width). - // The child group may have a `ShapeTransform` that affects the scale of its items, - // but shouldn't affect the scale of any inherited items. To prevent this scale - // from affecting inherited items, we have to apply an inverse scale to them. - let inheritedItems = try inheritedItemsForChildGroups.map { item in - ShapeItemLayer.Item( - item: try item.item.scaledCopyForChildGroup(group, context: context), - groupPath: item.groupPath) - } - - return try GroupLayer( - group: group, - items: childItems + inheritedItems, - groupPath: pathForChildren, - context: context) - } - } -} - -extension ShapeItem { - /// Whether or not this `ShapeItem` is responsible for rendering a `CGPath` - var drawsCGPath: Bool { - switch type { - case .ellipse, .rectangle, .shape, .star: - return true - - case .fill, .gradientFill, .group, .gradientStroke, .merge, - .repeater, .round, .stroke, .trim, .transform, .unknown: - return false - } - } - - /// Whether or not this `ShapeItem` provides a fill for a set of shapes - var isFill: Bool { - switch type { - case .fill, .gradientFill: - return true - - case .ellipse, .rectangle, .shape, .star, .group, .gradientStroke, - .merge, .repeater, .round, .stroke, .trim, .transform, .unknown: - return false - } - } - - /// Whether or not this `ShapeItem` provides a stroke for a set of shapes - var isStroke: Bool { - switch type { - case .stroke, .gradientStroke: - return true - - case .ellipse, .rectangle, .shape, .star, .group, .gradientFill, - .merge, .repeater, .round, .fill, .trim, .transform, .unknown: - return false - } - } - - // For any inherited shape items that are affected by scaling (e.g. strokes but not fills), - // any `ShapeTransform` in the given child group isn't supposed to be applied to the item. - // To cancel out the effect of the transform, we can apply an inverse transform to the - // shape item. - func scaledCopyForChildGroup(_ childGroup: Group, context: LayerContext) throws -> ShapeItem { - guard - // Path-drawing items aren't inherited by child groups in this way - !drawsCGPath, - // Stroke widths are affected by scaling, but fill colors aren't. - // We can expand this to other types of items in the future if necessary. - let stroke = self as? StrokeShapeItem, - // We only need to handle scaling if there's a `ShapeTransform` present - let transform = childGroup.items.first(where: { $0 is ShapeTransform }) as? ShapeTransform - else { return self } - - let newWidth = try Keyframes.combined(stroke.width, transform.scale) { strokeWidth, scale -> LottieVector1D in - // Since we're applying this scale to a scalar value rather than to a layer, - // we can only handle cases where the scale is also a scalar (e.g. the same for both x and y) - try context.compatibilityAssert(scale.x == scale.y, """ - The Core Animation rendering engine doesn't support applying separate x/y scale values \ - (x: \(scale.x), y: \(scale.y)) to this stroke item (\(self.name)). - """) - - return LottieVector1D(strokeWidth.value * (100 / scale.x)) - } - - return stroke.copy(width: newWidth) - } -} - -extension Collection { - /// Splits this collection into two groups, based on the given predicate - func grouped(by predicate: (Element) -> Bool) -> (trueElements: [Element], falseElements: [Element]) { - var trueElements = [Element]() - var falseElements = [Element]() - - for element in self { - if predicate(element) { - trueElements.append(element) - } else { - falseElements.append(element) - } - } - - return (trueElements, falseElements) - } -} - -// MARK: - ShapeRenderGroup - -/// A group of `ShapeItem`s that should be rendered together as a single unit -struct ShapeRenderGroup { - /// The items in this group that render `CGPath`s. - /// Valid shape render groups must have at least one path-drawing item. - var pathItems: [ShapeItemLayer.Item] = [] - /// Shape items that modify the appearance of the shapes rendered by this group - var otherItems: [ShapeItemLayer.Item] = [] -} - -extension Array where Element == ShapeItemLayer.Item { - /// Splits this list of `ShapeItem`s into groups that should be rendered together as individual units, - /// plus the remaining items that were not included in any group. - /// - groupHasChildGroupsToInheritUnusedItems: whether or not this group has child groups - /// that will inherit any items that aren't used as part of a valid render group - func shapeRenderGroups(groupHasChildGroupsToInheritUnusedItems: Bool) - -> (validGroups: [ShapeRenderGroup], unusedItems: [ShapeItemLayer.Item]) - { - var renderGroups = [ShapeRenderGroup()] - - for item in self { - // `renderGroups` is non-empty, so is guaranteed to have a valid end index - var lastIndex: Int { - renderGroups.indices.last! - } - - if item.item.drawsCGPath { - // Trims should only affect paths that precede them in the group, - // so if the existing group already has a trim we create a new group for this path item. - if renderGroups[lastIndex].otherItems.contains(where: { $0.item is Trim }) { - renderGroups.append(ShapeRenderGroup()) - } - - renderGroups[lastIndex].pathItems.append(item) - } - - // `Fill` items are unique, because they specifically only apply to _previous_ shapes in a `Group` - // - For example, with [Rectangle, Fill(Red), Circle, Fill(Blue)], the Rectangle should be Red - // but the Circle should be Blue. - // - To handle this, we create a new `ShapeRenderGroup` when we encounter a `Fill` item - else if item.item.isFill { - renderGroups[lastIndex].otherItems.append(item) - - // There are cases where the current render group doesn't have a path-drawing - // shape item yet, and could just contain this fill. Some examples: - // - `[Circle, Fill(Red), Fill(Green)]`: In this case, the second fill would - // be unused and silently ignored. To avoid this we render the fill using - // the shape items from the previous group. - // - `[Circle, Fill(Red), Group, Fill(Green)]`: In this case, the second fill - // is inherited and rendered by the child group. - if - renderGroups[lastIndex].pathItems.isEmpty, - !groupHasChildGroupsToInheritUnusedItems, - lastIndex != renderGroups.indices.first - { - renderGroups[lastIndex].pathItems = renderGroups[lastIndex - 1].pathItems - } - - // Finalize the group so the fill item doesn't affect following shape items - renderGroups.append(ShapeRenderGroup()) - } - - // Other items in the list are applied to all subgroups - else { - for index in renderGroups.indices { - renderGroups[index].otherItems.append(item) - } - } - } - - /// The main thread rendering engine draws each Stroke and Fill as a separate `CAShapeLayer`. - /// As an optimization, we can combine them into a single shape layer when a few conditions are met: - /// 1. There is at most one stroke and one fill (a `CAShapeLayer` can only render one of each) - /// 2. The stroke is drawn on top of the fill (the behavior of a `CAShapeLayer`) - /// 3. The fill and stroke have the same `opacity` animations (since a `CAShapeLayer` can only render - /// a single set of `opacity` animations). - /// Otherwise, each stroke / fill needs to be split into a separate layer. - renderGroups = renderGroups.flatMap { group -> [ShapeRenderGroup] in - let (strokesAndFills, otherItems) = group.otherItems.grouped(by: { $0.item.isFill || $0.item.isStroke }) - let (strokes, fills) = strokesAndFills.grouped(by: { $0.item.isStroke }) - - // A `CAShapeLayer` can only draw a single fill and a single stroke - let hasAtMostOneFill = fills.count <= 1 - let hasAtMostOneStroke = strokes.count <= 1 - - // A `CAShapeLayer` can only draw a stroke on top of a fill -- if the fill is supposed to be - // drawn on top of the stroke, then they have to be rendered as separate layers. - let strokeDrawnOnTopOfFill: Bool - if - let strokeIndex = strokesAndFills.firstIndex(where: { $0.item.isStroke }), - let fillIndex = strokesAndFills.firstIndex(where: { $0.item.isFill }) - { - strokeDrawnOnTopOfFill = strokeIndex < fillIndex - } else { - strokeDrawnOnTopOfFill = false - } - - // `Fill` and `Stroke` items have an `alpha` property that can be animated separately, - // but each layer only has a single `opacity` property. We can only use a single `CAShapeLayer` - // when the items have the same `alpha` animations. - let allAlphaAnimationsAreIdentical = { - strokesAndFills.allSatisfy { item in - (item.item as? OpacityAnimationModel)?.opacity - == (strokesAndFills.first?.item as? OpacityAnimationModel)?.opacity - } - } - - // If all the required conditions are met, this group can be rendered using a single `ShapeItemLayer` - if - hasAtMostOneFill, - hasAtMostOneStroke, - strokeDrawnOnTopOfFill, - allAlphaAnimationsAreIdentical() - { - return [group] - } - - // Otherwise each stroke / fill needs to be rendered as a separate `ShapeItemLayer` - return strokesAndFills.map { strokeOrFill in - ShapeRenderGroup( - pathItems: group.pathItems, - otherItems: [strokeOrFill] + otherItems) - } - } - - // All valid render groups must have a path, otherwise the items wouldn't be rendered - renderGroups = renderGroups.filter { renderGroup in - !renderGroup.pathItems.isEmpty - } - - let itemsInValidRenderGroups = NSSet( - array: renderGroups.lazy - .flatMap { $0.pathItems + $0.otherItems } - .map { $0.item }) - - // `unusedItems` should only include each original item a single time, - // and should preserve the existing order - let itemsNotInValidRenderGroups = filter { item in - !itemsInValidRenderGroups.contains(item.item) - } - - return (validGroups: renderGroups, unusedItems: itemsNotInValidRenderGroups) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/SolidLayer.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/SolidLayer.swift deleted file mode 100644 index a29e271..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/SolidLayer.swift +++ /dev/null @@ -1,47 +0,0 @@ -// Created by Cal Stephens on 12/13/21. -// Copyright © 2021 Airbnb Inc. All rights reserved. - -import QuartzCore - -// MARK: - SolidLayer - -final class SolidLayer: BaseCompositionLayer { - - // MARK: Lifecycle - - init(_ solidLayer: SolidLayerModel) { - self.solidLayer = solidLayer - super.init(layerModel: solidLayer) - setupContentLayer() - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - /// Called by CoreAnimation to create a shadow copy of this layer - /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - override init(layer: Any) { - guard let typedLayer = layer as? Self else { - fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))") - } - - solidLayer = typedLayer.solidLayer - super.init(layer: typedLayer) - } - - // MARK: Private - - private let solidLayer: SolidLayerModel - - private func setupContentLayer() { - // Render the fill color in a child `CAShapeLayer` - // - Using a `CAShapeLayer` specifically, instead of a `CALayer` with a `backgroundColor`, - // allows the size of the fill shape to be different from `contentsLayer.size`. - let shapeLayer = CAShapeLayer() - shapeLayer.fillColor = solidLayer.colorHex.cgColor - shapeLayer.path = CGPath(rect: .init(x: 0, y: 0, width: solidLayer.width, height: solidLayer.height), transform: nil) - addSublayer(shapeLayer) - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/TextLayer.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/TextLayer.swift deleted file mode 100644 index dd216c2..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/TextLayer.swift +++ /dev/null @@ -1,105 +0,0 @@ -// Created by Cal Stephens on 2/9/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -import QuartzCore - -/// The `CALayer` type responsible for rendering `TextLayer`s -final class TextLayer: BaseCompositionLayer { - - // MARK: Lifecycle - - init( - textLayerModel: TextLayerModel, - context: LayerContext) - throws - { - self.textLayerModel = textLayerModel - super.init(layerModel: textLayerModel) - setupSublayers() - try configureRenderLayer(with: context) - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - /// Called by CoreAnimation to create a shadow copy of this layer - /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - override init(layer: Any) { - guard let typedLayer = layer as? Self else { - fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))") - } - - textLayerModel = typedLayer.textLayerModel - super.init(layer: typedLayer) - } - - // MARK: Internal - - override func setupAnimations(context: LayerAnimationContext) throws { - try super.setupAnimations(context: context) - let textAnimationContext = context.addingKeypathComponent(textLayerModel.name) - - let sourceText = try textLayerModel.text.exactlyOneKeyframe( - context: textAnimationContext, - description: "text layer text") - - renderLayer.text = context.textProvider.textFor( - keypathName: textAnimationContext.currentKeypath.fullPath, - sourceText: sourceText.text) - - renderLayer.sizeToFit() - } - - func configureRenderLayer(with context: LayerContext) throws { - // We can't use `CATextLayer`, because it doesn't support enough features we use. - // Instead, we use the same `CoreTextRenderLayer` (with a custom `draw` implementation) - // used by the Main Thread rendering engine. This means the Core Animation engine can't - // _animate_ text properties, but it can display static text without any issues. - let text = try textLayerModel.text.exactlyOneKeyframe(context: context, description: "text layer text") - - // The Core Animation engine doesn't currently support `TextAnimator`s. - // - We could add support for animating the transform-related properties without much trouble. - // - We may be able to support animating `fillColor` by getting clever with layer blend modes - // or masks (e.g. use `CoreTextRenderLayer` to draw black glyphs, and then fill them in - // using a `CAShapeLayer`). - if !textLayerModel.animators.isEmpty { - try context.logCompatibilityIssue(""" - The Core Animation rendering engine currently doesn't support text animators. - """) - } - - renderLayer.font = context.fontProvider.fontFor(family: text.fontFamily, size: CGFloat(text.fontSize)) - - renderLayer.alignment = text.justification.textAlignment - renderLayer.lineHeight = CGFloat(text.lineHeight) - renderLayer.tracking = (CGFloat(text.fontSize) * CGFloat(text.tracking)) / 1000 - - renderLayer.fillColor = text.fillColorData?.cgColorValue - renderLayer.strokeColor = text.strokeColorData?.cgColorValue - renderLayer.strokeWidth = CGFloat(text.strokeWidth ?? 0) - renderLayer.strokeOnTop = text.strokeOverFill ?? false - - renderLayer.preferredSize = text.textFrameSize?.sizeValue - renderLayer.sizeToFit() - - renderLayer.transform = CATransform3DIdentity - renderLayer.position = text.textFramePosition?.pointValue ?? .zero - } - - // MARK: Private - - private let textLayerModel: TextLayerModel - private let renderLayer = CoreTextRenderLayer() - - private func setupSublayers() { - // Place the text render layer in an additional container - // - Direct sublayers of a `BaseCompositionLayer` always fill the bounds - // of their superlayer -- so this container will be the bounds of self, - // and the text render layer can be positioned anywhere. - let textContainerLayer = CALayer() - textContainerLayer.addSublayer(renderLayer) - addSublayer(textContainerLayer) - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/TransformLayer.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/TransformLayer.swift deleted file mode 100644 index 027739a..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/Layers/TransformLayer.swift +++ /dev/null @@ -1,11 +0,0 @@ -// Created by Cal Stephens on 12/21/21. -// Copyright © 2021 Airbnb Inc. All rights reserved. - -/// The CALayer type responsible for only rendering the `transform` of a `LayerModel` -final class TransformLayer: BaseCompositionLayer { - - /// `TransformLayer`s don't render any visible content, - /// they just `transform` their sublayers - override var renderLayerContents: Bool { false } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/ValueProviderStore.swift b/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/ValueProviderStore.swift deleted file mode 100644 index 2fe937a..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/CoreAnimation/ValueProviderStore.swift +++ /dev/null @@ -1,149 +0,0 @@ -// Created by Cal Stephens on 1/13/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -import QuartzCore - -// MARK: - ValueProviderStore - -/// Registration and storage for `AnyValueProvider`s that can dynamically -/// provide custom values for `AnimationKeypath`s within a `LottieAnimation`. -final class ValueProviderStore { - - // MARK: Lifecycle - - init(logger: LottieLogger) { - self.logger = logger - } - - // MARK: Internal - - /// Registers an `AnyValueProvider` for the given `AnimationKeypath` - func setValueProvider(_ valueProvider: AnyValueProvider, keypath: AnimationKeypath) { - logger.assert( - valueProvider.typeErasedStorage.isSupportedByCoreAnimationRenderingEngine, - """ - The Core Animation rendering engine doesn't support Value Providers that vend a closure, - because that would require calling the closure on the main thread once per frame. - """) - - let supportedProperties = PropertyName.allCases.map { $0.rawValue } - let propertyBeingCustomized = keypath.keys.last ?? "" - - logger.assert( - supportedProperties.contains(propertyBeingCustomized), - """ - The Core Animation rendering engine currently doesn't support customizing "\(propertyBeingCustomized)" \ - properties. Supported properties are: \(supportedProperties.joined(separator: ", ")). - """) - - valueProviders.append((keypath: keypath, valueProvider: valueProvider)) - } - - // Retrieves the custom value keyframes for the given property, - // if an `AnyValueProvider` was registered for the given keypath. - func customKeyframes( - of customizableProperty: CustomizableProperty, - for keypath: AnimationKeypath, - context: LayerAnimationContext) - throws -> KeyframeGroup? - { - context.recordHierarchyKeypath?(keypath.fullPath) - - guard let anyValueProvider = valueProvider(for: keypath) else { - return nil - } - - // Retrieve the type-erased keyframes from the custom `ValueProvider` - let typeErasedKeyframes: [Keyframe] - switch anyValueProvider.typeErasedStorage { - case .singleValue(let typeErasedValue): - typeErasedKeyframes = [Keyframe(typeErasedValue)] - - case .keyframes(let keyframes, _): - typeErasedKeyframes = keyframes - - case .closure: - try context.logCompatibilityIssue(""" - The Core Animation rendering engine doesn't support Value Providers that vend a closure, - because that would require calling the closure on the main thread once per frame. - """) - return nil - } - - // Convert the type-erased keyframe values using this `CustomizableProperty`'s conversion closure - let typedKeyframes = typeErasedKeyframes.compactMap { typeErasedKeyframe -> Keyframe? in - guard let convertedValue = customizableProperty.conversion(typeErasedKeyframe.value) else { - logger.assertionFailure(""" - Could not convert value of type \(type(of: typeErasedKeyframe.value)) to expected type \(Value.self) - """) - return nil - } - - return typeErasedKeyframe.withValue(convertedValue) - } - - // Verify that all of the keyframes were successfully converted to the expected type - guard typedKeyframes.count == typeErasedKeyframes.count else { - return nil - } - - return KeyframeGroup(keyframes: ContiguousArray(typedKeyframes)) - } - - // MARK: Private - - private let logger: LottieLogger - - private var valueProviders = [(keypath: AnimationKeypath, valueProvider: AnyValueProvider)]() - - /// Retrieves the most-recently-registered Value Provider that matches the given keypat - private func valueProvider(for keypath: AnimationKeypath) -> AnyValueProvider? { - // Find the last keypath matching the given keypath, - // so we return the value provider that was registered most-recently - valueProviders.last(where: { registeredKeypath, _ in - keypath.matches(registeredKeypath) - })?.valueProvider - } - -} - -extension AnyValueProviderStorage { - /// Whether or not this type of value provider is supported - /// by the new Core Animation rendering engine - var isSupportedByCoreAnimationRenderingEngine: Bool { - switch self { - case .singleValue, .keyframes: - return true - case .closure: - return false - } - } -} - -extension AnimationKeypath { - /// Whether or not this keypath from the animation hierarchy - /// matches the given keypath (which may contain wildcards) - func matches(_ keypath: AnimationKeypath) -> Bool { - var regex = "^" // match the start of the string - + keypath.keys.joined(separator: "\\.") // match this keypath, escaping "." characters - + "$" // match the end of the string - - // Replace the ** and * wildcards with markers that are guaranteed to be unique - // and won't conflict with regex syntax (e.g. `.*`). - let doubleWildcardMarker = UUID().uuidString - let singleWildcardMarker = UUID().uuidString - regex = regex.replacingOccurrences(of: "**", with: doubleWildcardMarker) - regex = regex.replacingOccurrences(of: "*", with: singleWildcardMarker) - - // "**" wildcards match zero or more path segments separated by "\\." - // - "**.Color" matches any of "Color", "Layer 1.Color", and "Layer 1.Layer 2.Color" - regex = regex.replacingOccurrences(of: "\(doubleWildcardMarker)\\.", with: ".*") - regex = regex.replacingOccurrences(of: doubleWildcardMarker, with: ".*") - - // "*" wildcards match exactly one path component - // - "*.Color" matches "Layer 1.Color" but not "Layer 1.Layer 2.Color" - regex = regex.replacingOccurrences(of: singleWildcardMarker, with: "[^.]+") - - return fullPath.range(of: regex, options: .regularExpression) != nil - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/CompositionLayer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/CompositionLayer.swift deleted file mode 100644 index 455d236..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/CompositionLayer.swift +++ /dev/null @@ -1,161 +0,0 @@ -// -// LayerContainer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/22/19. -// - -import Foundation -import QuartzCore - -// MARK: - CompositionLayer - -/// The base class for a child layer of CompositionContainer -class CompositionLayer: CALayer, KeypathSearchable { - - // MARK: Lifecycle - - init(layer: LayerModel, size: CGSize) { - transformNode = LayerTransformNode(transform: layer.transform) - if let masks = layer.masks?.filter({ $0.mode != .none }), !masks.isEmpty { - maskLayer = MaskContainerLayer(masks: masks) - } else { - maskLayer = nil - } - matteType = layer.matte - inFrame = layer.inFrame.cgFloat - outFrame = layer.outFrame.cgFloat - timeStretch = layer.timeStretch.cgFloat - startFrame = layer.startTime.cgFloat - keypathName = layer.name - childKeypaths = [transformNode.transformProperties] - super.init() - anchorPoint = .zero - actions = [ - "opacity" : NSNull(), - "transform" : NSNull(), - "bounds" : NSNull(), - "anchorPoint" : NSNull(), - "sublayerTransform" : NSNull(), - ] - - contentsLayer.anchorPoint = .zero - contentsLayer.bounds = CGRect(origin: .zero, size: size) - contentsLayer.actions = [ - "opacity" : NSNull(), - "transform" : NSNull(), - "bounds" : NSNull(), - "anchorPoint" : NSNull(), - "sublayerTransform" : NSNull(), - "hidden" : NSNull(), - ] - compositingFilter = layer.blendMode.filterName - addSublayer(contentsLayer) - - if let maskLayer = maskLayer { - contentsLayer.mask = maskLayer - } - - name = layer.name - } - - override init(layer: Any) { - /// Used for creating shadow model layers. Read More here: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - guard let layer = layer as? CompositionLayer else { - fatalError("Wrong Layer Class") - } - transformNode = layer.transformNode - matteType = layer.matteType - inFrame = layer.inFrame - outFrame = layer.outFrame - timeStretch = layer.timeStretch - startFrame = layer.startFrame - keypathName = layer.keypathName - childKeypaths = [transformNode.transformProperties] - maskLayer = nil - super.init(layer: layer) - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - // MARK: Internal - - weak var layerDelegate: CompositionLayerDelegate? - - let transformNode: LayerTransformNode - - let contentsLayer = CALayer() - - let maskLayer: MaskContainerLayer? - - let matteType: MatteType? - - let inFrame: CGFloat - let outFrame: CGFloat - let startFrame: CGFloat - let timeStretch: CGFloat - - // MARK: Keypath Searchable - - let keypathName: String - - final var childKeypaths: [KeypathSearchable] - - var renderScale: CGFloat = 1 { - didSet { - updateRenderScale() - } - } - - var matteLayer: CompositionLayer? { - didSet { - if let matte = matteLayer { - if let type = matteType, type == .invert { - mask = InvertedMatteLayer(inputMatte: matte) - } else { - mask = matte - } - } else { - mask = nil - } - } - } - - var keypathProperties: [String: AnyNodeProperty] { - [:] - } - - var keypathLayer: CALayer? { - contentsLayer - } - - final func displayWithFrame(frame: CGFloat, forceUpdates: Bool) { - transformNode.updateTree(frame, forceUpdates: forceUpdates) - let layerVisible = frame.isInRangeOrEqual(inFrame, outFrame) - /// Only update contents if current time is within the layers time bounds. - if layerVisible { - displayContentsWithFrame(frame: frame, forceUpdates: forceUpdates) - maskLayer?.updateWithFrame(frame: frame, forceUpdates: forceUpdates) - } - contentsLayer.transform = transformNode.globalTransform - contentsLayer.opacity = transformNode.opacity - contentsLayer.isHidden = !layerVisible - layerDelegate?.frameUpdated(frame: frame) - } - - func displayContentsWithFrame(frame _: CGFloat, forceUpdates _: Bool) { - /// To be overridden by subclass - } - - func updateRenderScale() { - contentsScale = renderScale - } -} - -// MARK: - CompositionLayerDelegate - -protocol CompositionLayerDelegate: AnyObject { - func frameUpdated(frame: CGFloat) -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/ImageCompositionLayer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/ImageCompositionLayer.swift deleted file mode 100644 index b1be980..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/ImageCompositionLayer.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// ImageCompositionLayer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/25/19. -// - -import CoreGraphics -import Foundation -import QuartzCore - -final class ImageCompositionLayer: CompositionLayer { - - // MARK: Lifecycle - - init(imageLayer: ImageLayerModel, size: CGSize) { - imageReferenceID = imageLayer.referenceID - super.init(layer: imageLayer, size: size) - contentsLayer.masksToBounds = true - contentsLayer.contentsGravity = CALayerContentsGravity.resize - } - - override init(layer: Any) { - /// Used for creating shadow model layers. Read More here: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - guard let layer = layer as? ImageCompositionLayer else { - fatalError("init(layer:) Wrong Layer Class") - } - imageReferenceID = layer.imageReferenceID - image = nil - super.init(layer: layer) - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - // MARK: Internal - - let imageReferenceID: String - - var image: CGImage? = nil { - didSet { - if let image = image { - contentsLayer.contents = image - } else { - contentsLayer.contents = nil - } - } - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/MaskContainerLayer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/MaskContainerLayer.swift deleted file mode 100644 index ab63de3..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/MaskContainerLayer.swift +++ /dev/null @@ -1,189 +0,0 @@ -// -// MaskContainerLayer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/25/19. -// - -import Foundation -import QuartzCore - -extension MaskMode { - var usableMode: MaskMode { - switch self { - case .add: - return .add - case .subtract: - return .subtract - case .intersect: - return .intersect - case .lighten: - return .add - case .darken: - return .darken - case .difference: - return .intersect - case .none: - return .none - } - } -} - -// MARK: - MaskContainerLayer - -final class MaskContainerLayer: CALayer { - - // MARK: Lifecycle - - init(masks: [Mask]) { - super.init() - anchorPoint = .zero - var containerLayer = CALayer() - var firstObject = true - for mask in masks { - let maskLayer = MaskLayer(mask: mask) - maskLayers.append(maskLayer) - if mask.mode.usableMode == .none { - continue - } else if mask.mode.usableMode == .add || firstObject { - firstObject = false - containerLayer.addSublayer(maskLayer) - } else { - containerLayer.mask = maskLayer - let newContainer = CALayer() - newContainer.addSublayer(containerLayer) - containerLayer = newContainer - } - } - addSublayer(containerLayer) - } - - override init(layer: Any) { - /// Used for creating shadow model layers. Read More here: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - guard let layer = layer as? MaskContainerLayer else { - fatalError("init(layer:) Wrong Layer Class") - } - super.init(layer: layer) - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - // MARK: Internal - - func updateWithFrame(frame: CGFloat, forceUpdates: Bool) { - maskLayers.forEach { $0.updateWithFrame(frame: frame, forceUpdates: forceUpdates) } - } - - // MARK: Fileprivate - - fileprivate var maskLayers: [MaskLayer] = [] -} - -extension CGRect { - static var veryLargeRect: CGRect { - CGRect( - x: -10_000_000, - y: -10_000_000, - width: 20_000_000, - height: 20_000_000) - } -} - -// MARK: - MaskLayer - -private class MaskLayer: CALayer { - - // MARK: Lifecycle - - init(mask: Mask) { - properties = MaskNodeProperties(mask: mask) - super.init() - addSublayer(maskLayer) - anchorPoint = .zero - maskLayer.fillColor = mask.mode == .add - ? .rgb(1, 0, 0) - : .rgb(0, 1, 0) - maskLayer.fillRule = CAShapeLayerFillRule.evenOdd - actions = [ - "opacity" : NSNull(), - ] - } - - override init(layer: Any) { - properties = nil - super.init(layer: layer) - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - // MARK: Internal - - let properties: MaskNodeProperties? - - let maskLayer = CAShapeLayer() - - func updateWithFrame(frame: CGFloat, forceUpdates: Bool) { - guard let properties = properties else { return } - if properties.opacity.needsUpdate(frame: frame) || forceUpdates { - properties.opacity.update(frame: frame) - opacity = Float(properties.opacity.value.cgFloatValue) - } - - if properties.shape.needsUpdate(frame: frame) || forceUpdates { - properties.shape.update(frame: frame) - properties.expansion.update(frame: frame) - - let shapePath = properties.shape.value.cgPath() - var path = shapePath - if - properties.mode.usableMode == .subtract && !properties.inverted || - (properties.mode.usableMode == .add && properties.inverted) - { - /// Add a bounds rect to invert the mask - let newPath = CGMutablePath() - newPath.addRect(CGRect.veryLargeRect) - newPath.addPath(shapePath) - path = newPath - } - maskLayer.path = path - } - } -} - -// MARK: - MaskNodeProperties - -private class MaskNodeProperties: NodePropertyMap { - - // MARK: Lifecycle - - init(mask: Mask) { - mode = mask.mode - inverted = mask.inverted - opacity = NodeProperty(provider: KeyframeInterpolator(keyframes: mask.opacity.keyframes)) - shape = NodeProperty(provider: KeyframeInterpolator(keyframes: mask.shape.keyframes)) - expansion = NodeProperty(provider: KeyframeInterpolator(keyframes: mask.expansion.keyframes)) - propertyMap = [ - PropertyName.opacity.rawValue : opacity, - "Shape" : shape, - "Expansion" : expansion, - ] - properties = Array(propertyMap.values) - } - - // MARK: Internal - - var propertyMap: [String: AnyNodeProperty] - - var properties: [AnyNodeProperty] - - let mode: MaskMode - let inverted: Bool - - let opacity: NodeProperty - let shape: NodeProperty - let expansion: NodeProperty -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/NullCompositionLayer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/NullCompositionLayer.swift deleted file mode 100644 index 3fdf163..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/NullCompositionLayer.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// NullCompositionLayer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/25/19. -// - -import Foundation - -final class NullCompositionLayer: CompositionLayer { - - init(layer: LayerModel) { - super.init(layer: layer, size: .zero) - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - override init(layer: Any) { - /// Used for creating shadow model layers. Read More here: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - guard let layer = layer as? NullCompositionLayer else { - fatalError("init(layer:) Wrong Layer Class") - } - super.init(layer: layer) - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/PreCompositionLayer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/PreCompositionLayer.swift deleted file mode 100644 index 1af57e4..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/PreCompositionLayer.swift +++ /dev/null @@ -1,121 +0,0 @@ -// -// PreCompositionLayer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/25/19. -// - -import Foundation -import QuartzCore - -final class PreCompositionLayer: CompositionLayer { - - // MARK: Lifecycle - - init( - precomp: PreCompLayerModel, - asset: PrecompAsset, - layerImageProvider: LayerImageProvider, - textProvider: AnimationTextProvider, - fontProvider: AnimationFontProvider, - assetLibrary: AssetLibrary?, - frameRate: CGFloat) - { - animationLayers = [] - if let keyframes = precomp.timeRemapping?.keyframes { - remappingNode = NodeProperty(provider: KeyframeInterpolator(keyframes: keyframes)) - } else { - remappingNode = nil - } - self.frameRate = frameRate - super.init(layer: precomp, size: CGSize(width: precomp.width, height: precomp.height)) - bounds = CGRect(origin: .zero, size: CGSize(width: precomp.width, height: precomp.height)) - contentsLayer.masksToBounds = true - contentsLayer.bounds = bounds - - let layers = asset.layers.initializeCompositionLayers( - assetLibrary: assetLibrary, - layerImageProvider: layerImageProvider, - textProvider: textProvider, - fontProvider: fontProvider, - frameRate: frameRate) - - var imageLayers = [ImageCompositionLayer]() - - var mattedLayer: CompositionLayer? = nil - - for layer in layers.reversed() { - layer.bounds = bounds - animationLayers.append(layer) - if let imageLayer = layer as? ImageCompositionLayer { - imageLayers.append(imageLayer) - } - if let matte = mattedLayer { - /// The previous layer requires this layer to be its matte - matte.matteLayer = layer - mattedLayer = nil - continue - } - if - let matte = layer.matteType, - matte == .add || matte == .invert - { - /// We have a layer that requires a matte. - mattedLayer = layer - } - contentsLayer.addSublayer(layer) - } - - childKeypaths.append(contentsOf: layers) - - layerImageProvider.addImageLayers(imageLayers) - } - - override init(layer: Any) { - /// Used for creating shadow model layers. Read More here: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - guard let layer = layer as? PreCompositionLayer else { - fatalError("init(layer:) Wrong Layer Class") - } - frameRate = layer.frameRate - remappingNode = nil - animationLayers = [] - - super.init(layer: layer) - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - // MARK: Internal - - let frameRate: CGFloat - let remappingNode: NodeProperty? - - override var keypathProperties: [String: AnyNodeProperty] { - guard let remappingNode = remappingNode else { - return super.keypathProperties - } - return ["Time Remap" : remappingNode] - } - - override func displayContentsWithFrame(frame: CGFloat, forceUpdates: Bool) { - let localFrame: CGFloat - if let remappingNode = remappingNode { - remappingNode.update(frame: frame) - localFrame = remappingNode.value.cgFloatValue * frameRate - } else { - localFrame = (frame - startFrame) / timeStretch - } - animationLayers.forEach { $0.displayWithFrame(frame: localFrame, forceUpdates: forceUpdates) } - } - - override func updateRenderScale() { - super.updateRenderScale() - animationLayers.forEach { $0.renderScale = renderScale } - } - - // MARK: Fileprivate - - fileprivate var animationLayers: [CompositionLayer] -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/ShapeCompositionLayer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/ShapeCompositionLayer.swift deleted file mode 100644 index a10189f..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/ShapeCompositionLayer.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// ShapeLayerContainer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/22/19. -// - -import CoreGraphics -import Foundation - -/// A CompositionLayer responsible for initializing and rendering shapes -final class ShapeCompositionLayer: CompositionLayer { - - // MARK: Lifecycle - - init(shapeLayer: ShapeLayerModel) { - let results = shapeLayer.items.initializeNodeTree() - let renderContainer = ShapeContainerLayer() - self.renderContainer = renderContainer - rootNode = results.rootNode - super.init(layer: shapeLayer, size: .zero) - contentsLayer.addSublayer(renderContainer) - for container in results.renderContainers { - renderContainer.insertRenderLayer(container) - } - rootNode?.updateTree(0, forceUpdates: true) - childKeypaths.append(contentsOf: results.childrenNodes) - } - - override init(layer: Any) { - guard let layer = layer as? ShapeCompositionLayer else { - fatalError("init(layer:) wrong class.") - } - rootNode = nil - renderContainer = nil - super.init(layer: layer) - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - // MARK: Internal - - let rootNode: AnimatorNode? - let renderContainer: ShapeContainerLayer? - - override func displayContentsWithFrame(frame: CGFloat, forceUpdates: Bool) { - rootNode?.updateTree(frame, forceUpdates: forceUpdates) - renderContainer?.markRenderUpdates(forFrame: frame) - } - - override func updateRenderScale() { - super.updateRenderScale() - renderContainer?.renderScale = renderScale - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/SolidCompositionLayer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/SolidCompositionLayer.swift deleted file mode 100644 index 34814ef..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/SolidCompositionLayer.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// SolidCompositionLayer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/25/19. -// - -import Foundation -import QuartzCore - -final class SolidCompositionLayer: CompositionLayer { - - // MARK: Lifecycle - - init(solid: SolidLayerModel) { - let components = solid.colorHex.hexColorComponents() - colorProperty = - NodeProperty(provider: SingleValueProvider(LottieColor( - r: Double(components.red), - g: Double(components.green), - b: Double(components.blue), - a: 1))) - - super.init(layer: solid, size: .zero) - solidShape.path = CGPath(rect: CGRect(x: 0, y: 0, width: solid.width, height: solid.height), transform: nil) - contentsLayer.addSublayer(solidShape) - } - - override init(layer: Any) { - /// Used for creating shadow model layers. Read More here: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - guard let layer = layer as? SolidCompositionLayer else { - fatalError("init(layer:) Wrong Layer Class") - } - colorProperty = layer.colorProperty - super.init(layer: layer) - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - // MARK: Internal - - let colorProperty: NodeProperty? - let solidShape = CAShapeLayer() - - override var keypathProperties: [String: AnyNodeProperty] { - guard let colorProperty = colorProperty else { return super.keypathProperties } - return [PropertyName.color.rawValue : colorProperty] - } - - override func displayContentsWithFrame(frame: CGFloat, forceUpdates _: Bool) { - guard let colorProperty = colorProperty else { return } - colorProperty.update(frame: frame) - solidShape.fillColor = colorProperty.value.cgColorValue - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/TextCompositionLayer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/TextCompositionLayer.swift deleted file mode 100644 index 0c21995..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/CompLayers/TextCompositionLayer.swift +++ /dev/null @@ -1,149 +0,0 @@ -// -// TextCompositionLayer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/25/19. -// - -import CoreGraphics -import CoreText -import Foundation -import QuartzCore - -/// Needed for NSMutableParagraphStyle... -#if os(OSX) -import AppKit -#else -import UIKit -#endif - -extension TextJustification { - var textAlignment: NSTextAlignment { - switch self { - case .left: - return .left - case .right: - return .right - case .center: - return .center - } - } - - var caTextAlignement: CATextLayerAlignmentMode { - switch self { - case .left: - return .left - case .right: - return .right - case .center: - return .center - } - } -} - -// MARK: - TextCompositionLayer - -final class TextCompositionLayer: CompositionLayer { - - // MARK: Lifecycle - - init(textLayer: TextLayerModel, textProvider: AnimationTextProvider, fontProvider: AnimationFontProvider) { - var rootNode: TextAnimatorNode? - for animator in textLayer.animators { - rootNode = TextAnimatorNode(parentNode: rootNode, textAnimator: animator) - } - self.rootNode = rootNode - textDocument = KeyframeInterpolator(keyframes: textLayer.text.keyframes) - - self.textProvider = textProvider - self.fontProvider = fontProvider - - super.init(layer: textLayer, size: .zero) - contentsLayer.addSublayer(self.textLayer) - self.textLayer.masksToBounds = false - self.textLayer.isGeometryFlipped = true - - if let rootNode = rootNode { - childKeypaths.append(rootNode) - } - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - override init(layer: Any) { - /// Used for creating shadow model layers. Read More here: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - guard let layer = layer as? TextCompositionLayer else { - fatalError("init(layer:) Wrong Layer Class") - } - rootNode = nil - textDocument = nil - - textProvider = DefaultTextProvider() - fontProvider = DefaultFontProvider() - - super.init(layer: layer) - } - - // MARK: Internal - - let rootNode: TextAnimatorNode? - let textDocument: KeyframeInterpolator? - - let textLayer = CoreTextRenderLayer() - var textProvider: AnimationTextProvider - var fontProvider: AnimationFontProvider - - override func displayContentsWithFrame(frame: CGFloat, forceUpdates: Bool) { - guard let textDocument = textDocument else { return } - - textLayer.contentsScale = renderScale - - let documentUpdate = textDocument.hasUpdate(frame: frame) - let animatorUpdate = rootNode?.updateContents(frame, forceLocalUpdate: forceUpdates) ?? false - guard documentUpdate == true || animatorUpdate == true else { return } - - rootNode?.rebuildOutputs(frame: frame) - - // Get Text Attributes - let text = textDocument.value(frame: frame) as! TextDocument - let strokeColor = rootNode?.textOutputNode.strokeColor ?? text.strokeColorData?.cgColorValue - let strokeWidth = rootNode?.textOutputNode.strokeWidth ?? CGFloat(text.strokeWidth ?? 0) - let tracking = (CGFloat(text.fontSize) * (rootNode?.textOutputNode.tracking ?? CGFloat(text.tracking))) / 1000.0 - let matrix = rootNode?.textOutputNode.xform ?? CATransform3DIdentity - let textString = textProvider.textFor(keypathName: keypathName, sourceText: text.text) - let ctFont = fontProvider.fontFor(family: text.fontFamily, size: CGFloat(text.fontSize)) - - // Set all of the text layer options - textLayer.text = textString - textLayer.font = ctFont - textLayer.alignment = text.justification.textAlignment - textLayer.lineHeight = CGFloat(text.lineHeight) - textLayer.tracking = tracking - - if let fillColor = rootNode?.textOutputNode.fillColor { - textLayer.fillColor = fillColor - } else if let fillColor = text.fillColorData?.cgColorValue { - textLayer.fillColor = fillColor - } else { - textLayer.fillColor = nil - } - - textLayer.preferredSize = text.textFrameSize?.sizeValue - textLayer.strokeOnTop = text.strokeOverFill ?? false - textLayer.strokeWidth = strokeWidth - textLayer.strokeColor = strokeColor - textLayer.sizeToFit() - - textLayer.opacity = Float(rootNode?.textOutputNode.opacity ?? 1) - textLayer.transform = CATransform3DIdentity - textLayer.position = text.textFramePosition?.pointValue ?? CGPoint.zero - textLayer.transform = matrix - } - - override func updateRenderScale() { - super.updateRenderScale() - textLayer.contentsScale = renderScale - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/MainThreadAnimationLayer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/MainThreadAnimationLayer.swift deleted file mode 100644 index 4dcc783..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/MainThreadAnimationLayer.swift +++ /dev/null @@ -1,288 +0,0 @@ -// -// MainThreadAnimationLayer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/24/19. -// - -import Foundation -import QuartzCore - -// MARK: - MainThreadAnimationLayer - -/// The base `CALayer` for the Main Thread rendering engine -/// -/// This layer holds a single composition container and allows for animation of -/// the currentFrame property. -final class MainThreadAnimationLayer: CALayer, RootAnimationLayer { - - // MARK: Lifecycle - - init( - animation: LottieAnimation, - imageProvider: AnimationImageProvider, - textProvider: AnimationTextProvider, - fontProvider: AnimationFontProvider, - maskAnimationToBounds: Bool, - logger: LottieLogger) - { - layerImageProvider = LayerImageProvider(imageProvider: imageProvider, assets: animation.assetLibrary?.imageAssets) - layerTextProvider = LayerTextProvider(textProvider: textProvider) - layerFontProvider = LayerFontProvider(fontProvider: fontProvider) - animationLayers = [] - self.logger = logger - super.init() - masksToBounds = maskAnimationToBounds - bounds = animation.bounds - let layers = animation.layers.initializeCompositionLayers( - assetLibrary: animation.assetLibrary, - layerImageProvider: layerImageProvider, - textProvider: textProvider, - fontProvider: fontProvider, - frameRate: CGFloat(animation.framerate)) - - var imageLayers = [ImageCompositionLayer]() - var textLayers = [TextCompositionLayer]() - - var mattedLayer: CompositionLayer? = nil - - for layer in layers.reversed() { - layer.bounds = bounds - animationLayers.append(layer) - if let imageLayer = layer as? ImageCompositionLayer { - imageLayers.append(imageLayer) - } - if let textLayer = layer as? TextCompositionLayer { - textLayers.append(textLayer) - } - if let matte = mattedLayer { - /// The previous layer requires this layer to be its matte - matte.matteLayer = layer - mattedLayer = nil - continue - } - if - let matte = layer.matteType, - matte == .add || matte == .invert - { - /// We have a layer that requires a matte. - mattedLayer = layer - } - addSublayer(layer) - } - - layerImageProvider.addImageLayers(imageLayers) - layerImageProvider.reloadImages() - layerTextProvider.addTextLayers(textLayers) - layerTextProvider.reloadTexts() - layerFontProvider.addTextLayers(textLayers) - layerFontProvider.reloadTexts() - setNeedsDisplay() - } - - /// Called by CoreAnimation to create a shadow copy of this layer - /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init - override init(layer: Any) { - guard let typedLayer = layer as? Self else { - fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))") - } - - animationLayers = [] - layerImageProvider = LayerImageProvider(imageProvider: BlankImageProvider(), assets: nil) - layerTextProvider = LayerTextProvider(textProvider: DefaultTextProvider()) - layerFontProvider = LayerFontProvider(fontProvider: DefaultFontProvider()) - logger = typedLayer.logger - super.init(layer: layer) - - currentFrame = typedLayer.currentFrame - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - // MARK: Public - - public var respectAnimationFrameRate = false - - // MARK: CALayer Animations - - override public class func needsDisplay(forKey key: String) -> Bool { - if key == "currentFrame" { - return true - } - return super.needsDisplay(forKey: key) - } - - override public func action(forKey event: String) -> CAAction? { - if event == "currentFrame" { - let animation = CABasicAnimation(keyPath: event) - animation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.linear) - animation.fromValue = presentation()?.currentFrame - return animation - } - return super.action(forKey: event) - } - - public override func display() { - guard Thread.isMainThread else { return } - var newFrame: CGFloat - if - let animationKeys = animationKeys(), - !animationKeys.isEmpty - { - newFrame = presentation()?.currentFrame ?? currentFrame - } else { - // We ignore the presentation's frame if there's no animation in the layer. - newFrame = currentFrame - } - if respectAnimationFrameRate { - newFrame = floor(newFrame) - } - animationLayers.forEach { $0.displayWithFrame(frame: newFrame, forceUpdates: false) } - } - - // MARK: Internal - - /// The animatable Current Frame Property - @NSManaged var currentFrame: CGFloat - - /// The parent `LottieAnimationView` that manages this layer - weak var animationView: LottieAnimationView? - - var animationLayers: ContiguousArray - - var primaryAnimationKey: AnimationKey { - .managed - } - - var isAnimationPlaying: Bool? { - nil // this state is managed by `LottieAnimationView` - } - - var _animationLayers: [CALayer] { - Array(animationLayers) - } - - var imageProvider: AnimationImageProvider { - get { - layerImageProvider.imageProvider - } - set { - layerImageProvider.imageProvider = newValue - } - } - - var renderScale: CGFloat = 1 { - didSet { - animationLayers.forEach { $0.renderScale = renderScale } - } - } - - var textProvider: AnimationTextProvider { - get { layerTextProvider.textProvider } - set { layerTextProvider.textProvider = newValue } - } - - var fontProvider: AnimationFontProvider { - get { layerFontProvider.fontProvider } - set { layerFontProvider.fontProvider = newValue } - } - - func reloadImages() { - layerImageProvider.reloadImages() - } - - func removeAnimations() { - // no-op, since the primary animation is managed by the `LottieAnimationView`. - } - - /// Forces the view to update its drawing. - func forceDisplayUpdate() { - animationLayers.forEach { $0.displayWithFrame(frame: currentFrame, forceUpdates: true) } - } - - func logHierarchyKeypaths() { - logger.info("Lottie: Logging Animation Keypaths") - - for keypath in allHierarchyKeypaths() { - logger.info(keypath) - } - } - - func allHierarchyKeypaths() -> [String] { - animationLayers.flatMap { $0.allKeypaths() } - } - - func setValueProvider(_ valueProvider: AnyValueProvider, keypath: AnimationKeypath) { - for layer in animationLayers { - if let foundProperties = layer.nodeProperties(for: keypath) { - for property in foundProperties { - property.setProvider(provider: valueProvider) - } - layer.displayWithFrame(frame: presentation()?.currentFrame ?? currentFrame, forceUpdates: true) - } - } - } - - func getValue(for keypath: AnimationKeypath, atFrame: CGFloat?) -> Any? { - for layer in animationLayers { - if - let foundProperties = layer.nodeProperties(for: keypath), - let first = foundProperties.first - { - return first.valueProvider.value(frame: atFrame ?? currentFrame) - } - } - return nil - } - - func getOriginalValue(for keypath: AnimationKeypath, atFrame: AnimationFrameTime?) -> Any? { - for layer in animationLayers { - if - let foundProperties = layer.nodeProperties(for: keypath), - let first = foundProperties.first - { - return first.originalValueProvider.value(frame: atFrame ?? currentFrame) - } - } - return nil - } - - func layer(for keypath: AnimationKeypath) -> CALayer? { - for layer in animationLayers { - if let foundLayer = layer.layer(for: keypath) { - return foundLayer - } - } - return nil - } - - func animatorNodes(for keypath: AnimationKeypath) -> [AnimatorNode]? { - var results = [AnimatorNode]() - for layer in animationLayers { - if let nodes = layer.animatorNodes(for: keypath) { - results.append(contentsOf: nodes) - } - } - if results.count == 0 { - return nil - } - return results - } - - // MARK: Fileprivate - - fileprivate let layerImageProvider: LayerImageProvider - fileprivate let layerTextProvider: LayerTextProvider - fileprivate let layerFontProvider: LayerFontProvider - fileprivate let logger: LottieLogger -} - -// MARK: - BlankImageProvider - -private class BlankImageProvider: AnimationImageProvider { - func imageForAsset(asset _: ImageAsset) -> CGImage? { - nil - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/CachedImageProvider.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/CachedImageProvider.swift deleted file mode 100644 index d2fa02c..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/CachedImageProvider.swift +++ /dev/null @@ -1,47 +0,0 @@ -// Created by Jianjun Wu on 2022/5/12. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -import CoreGraphics -import Foundation - -// MARK: - CachedImageProvider - -private final class CachedImageProvider: AnimationImageProvider { - - // MARK: Lifecycle - - /// Initializes an image provider with an image provider - /// - /// - Parameter imageProvider: The provider to load image from asset - /// - public init(imageProvider: AnimationImageProvider) { - self.imageProvider = imageProvider - } - - // MARK: Public - - public func imageForAsset(asset: ImageAsset) -> CGImage? { - if let image = imageCache.object(forKey: asset.id as NSString) { - return image - } - if let image = imageProvider.imageForAsset(asset: asset) { - imageCache.setObject(image, forKey: asset.id as NSString) - return image - } - return nil - } - - // MARK: Internal - - let imageCache: NSCache = .init() - let imageProvider: AnimationImageProvider -} - -extension AnimationImageProvider { - /// Create a cache enabled image provider which will reuse the asset image with the same asset id - /// It wraps the current provider as image loader, and uses `NSCache` to cache the images for resue. - /// The cache will be reset when the `animation` is reset. - var cachedImageProvider: AnimationImageProvider { - CachedImageProvider(imageProvider: self) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/CompositionLayersInitializer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/CompositionLayersInitializer.swift deleted file mode 100644 index fb4aa2b..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/CompositionLayersInitializer.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// CompositionLayersInitializer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/25/19. -// - -import CoreGraphics -import Foundation - -extension Array where Element == LayerModel { - - func initializeCompositionLayers( - assetLibrary: AssetLibrary?, - layerImageProvider: LayerImageProvider, - textProvider: AnimationTextProvider, - fontProvider: AnimationFontProvider, - frameRate: CGFloat) -> [CompositionLayer] - { - var compositionLayers = [CompositionLayer]() - var layerMap = [Int : CompositionLayer]() - - /// Organize the assets into a dictionary of [ID : ImageAsset] - var childLayers = [LayerModel]() - - for layer in self { - if layer.hidden == true { - let genericLayer = NullCompositionLayer(layer: layer) - compositionLayers.append(genericLayer) - layerMap[layer.index] = genericLayer - } else if let shapeLayer = layer as? ShapeLayerModel { - let shapeContainer = ShapeCompositionLayer(shapeLayer: shapeLayer) - compositionLayers.append(shapeContainer) - layerMap[layer.index] = shapeContainer - } else if let solidLayer = layer as? SolidLayerModel { - let solidContainer = SolidCompositionLayer(solid: solidLayer) - compositionLayers.append(solidContainer) - layerMap[layer.index] = solidContainer - } else if - let precompLayer = layer as? PreCompLayerModel, - let assetLibrary = assetLibrary, - let precompAsset = assetLibrary.precompAssets[precompLayer.referenceID] - { - let precompContainer = PreCompositionLayer( - precomp: precompLayer, - asset: precompAsset, - layerImageProvider: layerImageProvider, - textProvider: textProvider, - fontProvider: fontProvider, - assetLibrary: assetLibrary, - frameRate: frameRate) - compositionLayers.append(precompContainer) - layerMap[layer.index] = precompContainer - } else if - let imageLayer = layer as? ImageLayerModel, - let assetLibrary = assetLibrary, - let imageAsset = assetLibrary.imageAssets[imageLayer.referenceID] - { - let imageContainer = ImageCompositionLayer( - imageLayer: imageLayer, - size: CGSize(width: imageAsset.width, height: imageAsset.height)) - compositionLayers.append(imageContainer) - layerMap[layer.index] = imageContainer - } else if let textLayer = layer as? TextLayerModel { - let textContainer = TextCompositionLayer(textLayer: textLayer, textProvider: textProvider, fontProvider: fontProvider) - compositionLayers.append(textContainer) - layerMap[layer.index] = textContainer - } else { - let genericLayer = NullCompositionLayer(layer: layer) - compositionLayers.append(genericLayer) - layerMap[layer.index] = genericLayer - } - if layer.parent != nil { - childLayers.append(layer) - } - } - - /// Now link children with their parents - for layerModel in childLayers { - if let parentID = layerModel.parent { - let childLayer = layerMap[layerModel.index] - let parentLayer = layerMap[parentID] - childLayer?.transformNode.parentNode = parentLayer?.transformNode - } - } - - return compositionLayers - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/CoreTextRenderLayer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/CoreTextRenderLayer.swift deleted file mode 100644 index 5c6dbf7..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/CoreTextRenderLayer.swift +++ /dev/null @@ -1,349 +0,0 @@ -// -// TextLayer.swift -// Pods -// -// Created by Brandon Withrow on 8/3/20. -// - -import CoreGraphics -import CoreText -import Foundation -import QuartzCore -/// Needed for NSMutableParagraphStyle... -#if os(OSX) -import AppKit -#else -import UIKit -#endif - -// MARK: - CoreTextRenderLayer - -/// A CALayer subclass that renders text content using CoreText -final class CoreTextRenderLayer: CALayer { - - // MARK: Public - - public var text: String? { - didSet { - needsContentUpdate = true - setNeedsLayout() - setNeedsDisplay() - } - } - - public var font: CTFont? { - didSet { - needsContentUpdate = true - setNeedsLayout() - setNeedsDisplay() - } - } - - public var alignment: NSTextAlignment = .left { - didSet { - needsContentUpdate = true - setNeedsLayout() - setNeedsDisplay() - } - } - - public var lineHeight: CGFloat = 0 { - didSet { - needsContentUpdate = true - setNeedsLayout() - setNeedsDisplay() - } - } - - public var tracking: CGFloat = 0 { - didSet { - needsContentUpdate = true - setNeedsLayout() - setNeedsDisplay() - } - } - - public var fillColor: CGColor? { - didSet { - needsContentUpdate = true - setNeedsLayout() - setNeedsDisplay() - } - } - - public var strokeColor: CGColor? { - didSet { - needsContentUpdate = true - setNeedsLayout() - setNeedsDisplay() - } - } - - public var strokeWidth: CGFloat = 0 { - didSet { - needsContentUpdate = true - setNeedsLayout() - setNeedsDisplay() - } - } - - public var strokeOnTop = false { - didSet { - setNeedsLayout() - setNeedsDisplay() - } - } - - public var preferredSize: CGSize? { - didSet { - needsContentUpdate = true - setNeedsLayout() - setNeedsDisplay() - } - } - - public func sizeToFit() { - updateTextContent() - bounds = drawingRect - anchorPoint = drawingAnchor - setNeedsLayout() - setNeedsDisplay() - } - - // MARK: Internal - - override func action(forKey _: String) -> CAAction? { - nil - } - - override func draw(in ctx: CGContext) { - guard let attributedString = attributedString else { return } - updateTextContent() - guard fillFrameSetter != nil || strokeFrameSetter != nil else { return } - - ctx.textMatrix = .identity - ctx.setAllowsAntialiasing(true) - ctx.setAllowsFontSubpixelPositioning(true) - ctx.setAllowsFontSubpixelQuantization(true) - - ctx.setShouldAntialias(true) - ctx.setShouldSubpixelPositionFonts(true) - ctx.setShouldSubpixelQuantizeFonts(true) - - if contentsAreFlipped() { - ctx.translateBy(x: 0, y: drawingRect.height) - ctx.scaleBy(x: 1.0, y: -1.0) - } - - let drawingPath = CGPath(rect: drawingRect, transform: nil) - - let fillFrame: CTFrame? - if let setter = fillFrameSetter { - fillFrame = CTFramesetterCreateFrame(setter, CFRangeMake(0, attributedString.length), drawingPath, nil) - } else { - fillFrame = nil - } - - let strokeFrame: CTFrame? - if let setter = strokeFrameSetter { - strokeFrame = CTFramesetterCreateFrame(setter, CFRangeMake(0, attributedString.length), drawingPath, nil) - } else { - strokeFrame = nil - } - - // This fixes a vertical padding issue that arises when drawing some fonts. - // For some reason some fonts, such as Helvetica draw with and ascender that is greater than the one reported by CTFontGetAscender. - // I suspect this is actually an issue with the Attributed string, but cannot reproduce. - - if let fillFrame = fillFrame { - ctx.adjustWithLineOrigins(in: fillFrame, with: font) - } else if let strokeFrame = strokeFrame { - ctx.adjustWithLineOrigins(in: strokeFrame, with: font) - } - - if !strokeOnTop, let strokeFrame = strokeFrame { - CTFrameDraw(strokeFrame, ctx) - } - - if let fillFrame = fillFrame { - CTFrameDraw(fillFrame, ctx) - } - - if strokeOnTop, let strokeFrame = strokeFrame { - CTFrameDraw(strokeFrame, ctx) - } - } - - // MARK: Private - - private var drawingRect: CGRect = .zero - private var drawingAnchor: CGPoint = .zero - private var fillFrameSetter: CTFramesetter? - private var attributedString: NSAttributedString? - private var strokeFrameSetter: CTFramesetter? - private var needsContentUpdate = false - - // Draws Debug colors for the font alignment. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - private func drawDebug(_ ctx: CGContext) { - if let font = font { - let ascent = CTFontGetAscent(font) - let descent = CTFontGetDescent(font) - let capHeight = CTFontGetCapHeight(font) - let leading = CTFontGetLeading(font) - - // Ascent Red - ctx.setFillColor(CGColor(srgbRed: 1, green: 0, blue: 0, alpha: 0.5)) - ctx.fill(CGRect(x: 0, y: 0, width: drawingRect.width, height: ascent)) - - // Descent Blue - ctx.setFillColor(CGColor(srgbRed: 0, green: 0, blue: 1, alpha: 0.5)) - ctx.fill(CGRect(x: 0, y: ascent, width: drawingRect.width, height: descent)) - - // Leading Yellow - ctx.setFillColor(CGColor(srgbRed: 1, green: 1, blue: 0, alpha: 0.5)) - ctx.fill(CGRect(x: 0, y: ascent + descent, width: drawingRect.width, height: leading)) - - // Cap height Green - ctx.setFillColor(CGColor(srgbRed: 0, green: 1, blue: 0, alpha: 0.5)) - ctx.fill(CGRect(x: 0, y: ascent - capHeight, width: drawingRect.width, height: capHeight)) - - if drawingRect.height - ascent + descent + leading > 0 { - // Remainder - ctx.setFillColor(CGColor(srgbRed: 0, green: 1, blue: 1, alpha: 0.5)) - ctx - .fill(CGRect( - x: 0, - y: ascent + descent + leading, - width: drawingRect.width, - height: drawingRect.height - ascent + descent + leading)) - } - } - } - - private func updateTextContent() { - guard needsContentUpdate else { return } - needsContentUpdate = false - guard let font = font, let text = text, text.count > 0, fillColor != nil || strokeColor != nil else { - drawingRect = .zero - drawingAnchor = .zero - attributedString = nil - fillFrameSetter = nil - strokeFrameSetter = nil - return - } - - // Get Font properties - let ascent = CTFontGetAscent(font) - let descent = CTFontGetDescent(font) - let capHeight = CTFontGetCapHeight(font) - let leading = CTFontGetLeading(font) - let minLineHeight = -(ascent + descent + leading) - - // Calculate line spacing - let lineSpacing = max(CGFloat(minLineHeight) + lineHeight, CGFloat(minLineHeight)) - // Build Attributes - let paragraphStyle = NSMutableParagraphStyle() - paragraphStyle.lineSpacing = lineSpacing - paragraphStyle.lineHeightMultiple = 1 - paragraphStyle.maximumLineHeight = ascent + descent + leading - paragraphStyle.alignment = alignment - paragraphStyle.lineBreakMode = NSLineBreakMode.byWordWrapping - var attributes: [NSAttributedString.Key: Any] = [ - NSAttributedString.Key.ligature: 0, - NSAttributedString.Key.font: font, - NSAttributedString.Key.kern: tracking, - NSAttributedString.Key.paragraphStyle: paragraphStyle, - ] - - if let fillColor = fillColor { - attributes[NSAttributedString.Key.foregroundColor] = fillColor - } - - let attrString = NSAttributedString(string: text, attributes: attributes) - attributedString = attrString - - if fillColor != nil { - let setter = CTFramesetterCreateWithAttributedString(attrString as CFAttributedString) - fillFrameSetter = setter - } else { - fillFrameSetter = nil - } - - if let strokeColor = strokeColor { - attributes[NSAttributedString.Key.foregroundColor] = nil - attributes[NSAttributedString.Key.strokeWidth] = strokeWidth - attributes[NSAttributedString.Key.strokeColor] = strokeColor - let strokeAttributedString = NSAttributedString(string: text, attributes: attributes) - strokeFrameSetter = CTFramesetterCreateWithAttributedString(strokeAttributedString as CFAttributedString) - } else { - strokeFrameSetter = nil - strokeWidth = 0 - } - - guard let setter = fillFrameSetter ?? strokeFrameSetter else { - return - } - - // Calculate drawing size and anchor offset - let textAnchor: CGPoint - if let preferredSize = preferredSize { - drawingRect = CGRect(origin: .zero, size: preferredSize) - drawingRect.size.height += (ascent - capHeight) - drawingRect.size.height += descent - textAnchor = CGPoint(x: 0, y: ascent - capHeight) - } else { - let size = CTFramesetterSuggestFrameSizeWithConstraints( - setter, - CFRange(location: 0, length: attrString.length), - nil, - CGSize(width: CGFloat.greatestFiniteMagnitude, height: CGFloat.greatestFiniteMagnitude), - nil) - switch alignment { - case .left: - textAnchor = CGPoint(x: 0, y: ascent) - case .right: - textAnchor = CGPoint(x: size.width, y: ascent) - case .center: - textAnchor = CGPoint(x: size.width * 0.5, y: ascent) - default: - textAnchor = .zero - } - drawingRect = CGRect( - x: 0, - y: 0, - width: ceil(size.width), - height: ceil(size.height)) - } - - // Now Calculate Anchor - drawingAnchor = CGPoint( - x: textAnchor.x.remap(fromLow: 0, fromHigh: drawingRect.size.width, toLow: 0, toHigh: 1), - y: textAnchor.y.remap(fromLow: 0, fromHigh: drawingRect.size.height, toLow: 0, toHigh: 1)) - - if fillFrameSetter != nil, strokeFrameSetter != nil { - drawingRect.size.width += strokeWidth - drawingRect.size.height += strokeWidth - } - } - -} - -extension CGContext { - - fileprivate func adjustWithLineOrigins(in frame: CTFrame, with font: CTFont?) { - guard let font = font else { return } - - let count = CFArrayGetCount(CTFrameGetLines(frame)) - - guard count > 0 else { return } - - var o = [CGPoint](repeating: .zero, count: 1) - CTFrameGetLineOrigins(frame, CFRange(location: count - 1, length: 1), &o) - - let diff = CTFontGetDescent(font) - o[0].y - if diff > 0 { - translateBy(x: 0, y: diff) - } - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/InvertedMatteLayer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/InvertedMatteLayer.swift deleted file mode 100644 index 6a8c675..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/InvertedMatteLayer.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// InvertedMatteLayer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/28/19. -// - -import Foundation -import QuartzCore - -/// A layer that inverses the alpha output of its input layer. -/// -/// WARNING: This is experimental and probably not very performant. -final class InvertedMatteLayer: CALayer, CompositionLayerDelegate { - - // MARK: Lifecycle - - init(inputMatte: CompositionLayer) { - self.inputMatte = inputMatte - super.init() - inputMatte.layerDelegate = self - anchorPoint = .zero - bounds = inputMatte.bounds - setNeedsDisplay() - } - - override init(layer: Any) { - guard let layer = layer as? InvertedMatteLayer else { - fatalError("init(layer:) wrong class.") - } - inputMatte = nil - super.init(layer: layer) - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - // MARK: Internal - - let inputMatte: CompositionLayer? - let wrapperLayer = CALayer() - - func frameUpdated(frame _: CGFloat) { - setNeedsDisplay() - displayIfNeeded() - } - - override func draw(in ctx: CGContext) { - guard let inputMatte = inputMatte else { return } - ctx.setFillColor(.rgb(0, 0, 0)) - ctx.fill(bounds) - ctx.setBlendMode(.destinationOut) - inputMatte.render(in: ctx) - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/LayerFontProvider.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/LayerFontProvider.swift deleted file mode 100644 index 902f438..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/LayerFontProvider.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// LayerFontProvider.swift -// Lottie -// -// Created by Brandon Withrow on 8/5/20. -// Copyright © 2020 YurtvilleProds. All rights reserved. -// - -import Foundation - -/// Connects a LottieFontProvider to a group of text layers -final class LayerFontProvider { - - // MARK: Lifecycle - - init(fontProvider: AnimationFontProvider) { - self.fontProvider = fontProvider - textLayers = [] - reloadTexts() - } - - // MARK: Internal - - private(set) var textLayers: [TextCompositionLayer] - - var fontProvider: AnimationFontProvider { - didSet { - reloadTexts() - } - } - - func addTextLayers(_ layers: [TextCompositionLayer]) { - textLayers += layers - } - - func reloadTexts() { - textLayers.forEach { - $0.fontProvider = fontProvider - } - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/LayerImageProvider.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/LayerImageProvider.swift deleted file mode 100644 index d943ffe..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/LayerImageProvider.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// LayerImageProvider.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/25/19. -// - -import Foundation - -/// Connects a LottieImageProvider to a group of image layers -final class LayerImageProvider { - - // MARK: Lifecycle - - init(imageProvider: AnimationImageProvider, assets: [String: ImageAsset]?) { - self.imageProvider = imageProvider - imageLayers = [ImageCompositionLayer]() - if let assets = assets { - imageAssets = assets - } else { - imageAssets = [:] - } - reloadImages() - } - - // MARK: Internal - - private(set) var imageLayers: [ImageCompositionLayer] - let imageAssets: [String: ImageAsset] - - var imageProvider: AnimationImageProvider { - didSet { - reloadImages() - } - } - - func addImageLayers(_ layers: [ImageCompositionLayer]) { - for layer in layers { - if imageAssets[layer.imageReferenceID] != nil { - /// Found a linking asset in our asset library. Add layer - imageLayers.append(layer) - } - } - } - - func reloadImages() { - for imageLayer in imageLayers { - if let asset = imageAssets[imageLayer.imageReferenceID] { - imageLayer.image = imageProvider.imageForAsset(asset: asset) - } - } - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/LayerTextProvider.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/LayerTextProvider.swift deleted file mode 100644 index 53806d5..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/LayerTextProvider.swift +++ /dev/null @@ -1,40 +0,0 @@ -// -// LayerTextProvider.swift -// lottie-ios-iOS -// -// Created by Alexandr Goncharov on 07/06/2019. -// - -import Foundation - -/// Connects a LottieTextProvider to a group of text layers -final class LayerTextProvider { - - // MARK: Lifecycle - - init(textProvider: AnimationTextProvider) { - self.textProvider = textProvider - textLayers = [] - reloadTexts() - } - - // MARK: Internal - - private(set) var textLayers: [TextCompositionLayer] - - var textProvider: AnimationTextProvider { - didSet { - reloadTexts() - } - } - - func addTextLayers(_ layers: [TextCompositionLayer]) { - textLayers += layers - } - - func reloadTexts() { - textLayers.forEach { - $0.textProvider = textProvider - } - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/LayerTransformNode.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/LayerTransformNode.swift deleted file mode 100644 index 83c535f..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/LayerContainers/Utility/LayerTransformNode.swift +++ /dev/null @@ -1,152 +0,0 @@ -// -// LayerTransformPropertyMap.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/4/19. -// - -import CoreGraphics -import Foundation -import QuartzCore - -// MARK: - LayerTransformProperties - -final class LayerTransformProperties: NodePropertyMap, KeypathSearchable { - - // MARK: Lifecycle - - init(transform: Transform) { - anchor = NodeProperty(provider: KeyframeInterpolator(keyframes: transform.anchorPoint.keyframes)) - scale = NodeProperty(provider: KeyframeInterpolator(keyframes: transform.scale.keyframes)) - rotationX = NodeProperty(provider: KeyframeInterpolator(keyframes: transform.rotationX.keyframes)) - rotationY = NodeProperty(provider: KeyframeInterpolator(keyframes: transform.rotationY.keyframes)) - rotationZ = NodeProperty(provider: KeyframeInterpolator(keyframes: transform.rotationZ.keyframes)) - opacity = NodeProperty(provider: KeyframeInterpolator(keyframes: transform.opacity.keyframes)) - - var propertyMap: [String: AnyNodeProperty] = [ - "Anchor Point" : anchor, - PropertyName.scale.rawValue : scale, - PropertyName.rotation.rawValue: rotationZ, - "Rotation X" : rotationX, - "Rotation Y" : rotationY, - "Rotation Z" : rotationZ, - PropertyName.opacity.rawValue : opacity, - ] - - if - let positionKeyframesX = transform.positionX?.keyframes, - let positionKeyframesY = transform.positionY?.keyframes - { - let xPosition: NodeProperty = NodeProperty(provider: KeyframeInterpolator(keyframes: positionKeyframesX)) - let yPosition: NodeProperty = NodeProperty(provider: KeyframeInterpolator(keyframes: positionKeyframesY)) - propertyMap["X Position"] = xPosition - propertyMap["Y Position"] = yPosition - positionX = xPosition - positionY = yPosition - position = nil - } else if let positionKeyframes = transform.position?.keyframes { - let position: NodeProperty = NodeProperty(provider: KeyframeInterpolator(keyframes: positionKeyframes)) - propertyMap[PropertyName.position.rawValue] = position - self.position = position - positionX = nil - positionY = nil - } else { - position = nil - positionY = nil - positionX = nil - } - - keypathProperties = propertyMap - properties = Array(propertyMap.values) - } - - // MARK: Internal - - let keypathProperties: [String: AnyNodeProperty] - var keypathName = "Transform" - - let properties: [AnyNodeProperty] - - let anchor: NodeProperty - let scale: NodeProperty - let rotationX: NodeProperty - let rotationY: NodeProperty - let rotationZ: NodeProperty - let position: NodeProperty? - let positionX: NodeProperty? - let positionY: NodeProperty? - let opacity: NodeProperty - - var childKeypaths: [KeypathSearchable] { - [] - } -} - -// MARK: - LayerTransformNode - -class LayerTransformNode: AnimatorNode { - - // MARK: Lifecycle - - init(transform: Transform) { - transformProperties = LayerTransformProperties(transform: transform) - } - - // MARK: Internal - - let outputNode: NodeOutput = PassThroughOutputNode(parent: nil) - - let transformProperties: LayerTransformProperties - - var parentNode: AnimatorNode? - var hasLocalUpdates = false - var hasUpstreamUpdates = false - var lastUpdateFrame: CGFloat? = nil - var isEnabled = true - - var opacity: Float = 1 - var localTransform: CATransform3D = CATransform3DIdentity - var globalTransform: CATransform3D = CATransform3DIdentity - - // MARK: Animator Node Protocol - - var propertyMap: NodePropertyMap & KeypathSearchable { - transformProperties - } - - func shouldRebuildOutputs(frame _: CGFloat) -> Bool { - hasLocalUpdates || hasUpstreamUpdates - } - - func rebuildOutputs(frame _: CGFloat) { - opacity = Float(transformProperties.opacity.value.cgFloatValue) * 0.01 - - let position: CGPoint - if let point = transformProperties.position?.value.pointValue { - position = point - } else if - let xPos = transformProperties.positionX?.value.cgFloatValue, - let yPos = transformProperties.positionY?.value.cgFloatValue - { - position = CGPoint(x: xPos, y: yPos) - } else { - position = .zero - } - - localTransform = CATransform3D.makeTransform( - anchor: transformProperties.anchor.value.pointValue, - position: position, - scale: transformProperties.scale.value.sizeValue, - rotationX: transformProperties.rotationX.value.cgFloatValue, - rotationY: transformProperties.rotationY.value.cgFloatValue, - rotationZ: transformProperties.rotationZ.value.cgFloatValue, - skew: nil, - skewAxis: nil) - - if let parentNode = parentNode as? LayerTransformNode { - globalTransform = CATransform3DConcat(localTransform, parentNode.globalTransform) - } else { - globalTransform = localTransform - } - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Extensions/ItemsExtension.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Extensions/ItemsExtension.swift deleted file mode 100644 index 5dc8fc4..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Extensions/ItemsExtension.swift +++ /dev/null @@ -1,107 +0,0 @@ -// -// ItemsExtension.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/18/19. -// - -import Foundation - -// MARK: - NodeTree - -final class NodeTree { - var rootNode: AnimatorNode? = nil - var transform: ShapeTransform? = nil - var renderContainers: [ShapeContainerLayer] = [] - var paths: [PathOutputNode] = [] - var childrenNodes: [AnimatorNode] = [] -} - -extension Array where Element == ShapeItem { - func initializeNodeTree() -> NodeTree { - let nodeTree = NodeTree() - - for item in self { - guard item.hidden == false, item.type != .unknown else { continue } - if let fill = item as? Fill { - let node = FillNode(parentNode: nodeTree.rootNode, fill: fill) - nodeTree.rootNode = node - nodeTree.childrenNodes.append(node) - } else if let stroke = item as? Stroke { - let node = StrokeNode(parentNode: nodeTree.rootNode, stroke: stroke) - nodeTree.rootNode = node - nodeTree.childrenNodes.append(node) - } else if let gradientFill = item as? GradientFill { - let node = GradientFillNode(parentNode: nodeTree.rootNode, gradientFill: gradientFill) - nodeTree.rootNode = node - nodeTree.childrenNodes.append(node) - } else if let gradientStroke = item as? GradientStroke { - let node = GradientStrokeNode(parentNode: nodeTree.rootNode, gradientStroke: gradientStroke) - nodeTree.rootNode = node - nodeTree.childrenNodes.append(node) - } else if let ellipse = item as? Ellipse { - let node = EllipseNode(parentNode: nodeTree.rootNode, ellipse: ellipse) - nodeTree.rootNode = node - nodeTree.childrenNodes.append(node) - } else if let rect = item as? Rectangle { - let node = RectangleNode(parentNode: nodeTree.rootNode, rectangle: rect) - nodeTree.rootNode = node - nodeTree.childrenNodes.append(node) - } else if let star = item as? Star { - switch star.starType { - case .none: - continue - case .polygon: - let node = PolygonNode(parentNode: nodeTree.rootNode, star: star) - nodeTree.rootNode = node - nodeTree.childrenNodes.append(node) - case .star: - let node = StarNode(parentNode: nodeTree.rootNode, star: star) - nodeTree.rootNode = node - nodeTree.childrenNodes.append(node) - } - } else if let shape = item as? Shape { - let node = ShapeNode(parentNode: nodeTree.rootNode, shape: shape) - nodeTree.rootNode = node - nodeTree.childrenNodes.append(node) - } else if let trim = item as? Trim { - let node = TrimPathNode(parentNode: nodeTree.rootNode, trim: trim, upstreamPaths: nodeTree.paths) - nodeTree.rootNode = node - nodeTree.childrenNodes.append(node) - } else if let roundedCorners = item as? RoundedCorners { - let node = RoundedCornersNode( - parentNode: nodeTree.rootNode, - roundedCorners: roundedCorners, - upstreamPaths: nodeTree.paths) - nodeTree.rootNode = node - nodeTree.childrenNodes.append(node) - } else if let xform = item as? ShapeTransform { - nodeTree.transform = xform - continue - } else if let group = item as? Group { - let tree = group.items.initializeNodeTree() - let node = GroupNode(name: group.name, parentNode: nodeTree.rootNode, tree: tree) - nodeTree.rootNode = node - nodeTree.childrenNodes.append(node) - /// Now add all child paths to current tree - nodeTree.paths.append(contentsOf: tree.paths) - nodeTree.renderContainers.append(node.container) - } else if item is Repeater { - LottieLogger.shared.warn(""" - The Main Thread rendering engine doesn't currently support repeaters. - To play an animation with repeaters, you can use the Core Animation rendering engine instead. - """) - } - - if let pathNode = nodeTree.rootNode as? PathNode { - //// Add path container to the node tree - nodeTree.paths.append(pathNode.pathOutput) - } - - if let renderNode = nodeTree.rootNode as? RenderNode { - nodeTree.renderContainers.append(ShapeRenderLayer(renderer: renderNode.renderer)) - } - } - return nodeTree - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/NodeProperty.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/NodeProperty.swift deleted file mode 100644 index 8702f2c..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/NodeProperty.swift +++ /dev/null @@ -1,55 +0,0 @@ -// -// NodeProperty.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/30/19. -// - -import CoreGraphics -import Foundation - -/// A node property that holds a reference to a T ValueProvider and a T ValueContainer. -class NodeProperty: AnyNodeProperty { - - // MARK: Lifecycle - - init(provider: AnyValueProvider) { - valueProvider = provider - originalValueProvider = valueProvider - typedContainer = ValueContainer(provider.value(frame: 0) as! T) - typedContainer.setNeedsUpdate() - } - - // MARK: Internal - - var valueProvider: AnyValueProvider - var originalValueProvider: AnyValueProvider - - var valueType: Any.Type { T.self } - - var value: T { - typedContainer.outputValue - } - - var valueContainer: AnyValueContainer { - typedContainer - } - - func needsUpdate(frame: CGFloat) -> Bool { - valueContainer.needsUpdate || valueProvider.hasUpdate(frame: frame) - } - - func setProvider(provider: AnyValueProvider) { - guard provider.valueType == valueType else { return } - valueProvider = provider - valueContainer.setNeedsUpdate() - } - - func update(frame: CGFloat) { - typedContainer.setValue(valueProvider.value(frame: frame), forFrame: frame) - } - - // MARK: Fileprivate - - fileprivate var typedContainer: ValueContainer -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/AnyNodeProperty.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/AnyNodeProperty.swift deleted file mode 100644 index 132d96a..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/AnyNodeProperty.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// AnyNodeProperty.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/30/19. -// - -import CoreGraphics -import Foundation - -// MARK: - AnyNodeProperty - -/// A property of a node. The node property holds a provider and a container -protocol AnyNodeProperty { - - /// Returns true if the property needs to recompute its stored value - func needsUpdate(frame: CGFloat) -> Bool - - /// Updates the property for the frame - func update(frame: CGFloat) - - /// The stored value container for the property - var valueContainer: AnyValueContainer { get } - - /// The value provider for the property - var valueProvider: AnyValueProvider { get } - - /// The original value provider for the property - var originalValueProvider: AnyValueProvider { get } - - /// The Type of the value provider - var valueType: Any.Type { get } - - /// Sets the value provider for the property. - func setProvider(provider: AnyValueProvider) -} - -extension AnyNodeProperty { - - /// Returns the most recently computed value for the keypath, returns nil if property wasn't found - func getValueOfType() -> T? { - valueContainer.value as? T - } - - /// Returns the most recently computed value for the keypath, returns nil if property wasn't found - func getValue() -> Any? { - valueContainer.value - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/AnyValueContainer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/AnyValueContainer.swift deleted file mode 100644 index 769d51c..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/AnyValueContainer.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// AnyValueContainer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/30/19. -// - -import CoreGraphics -import Foundation - -/// The container for the value of a property. -protocol AnyValueContainer: AnyObject { - - /// The stored value of the container - var value: Any { get } - - /// Notifies the provider that it should update its container - func setNeedsUpdate() - - /// When true the container needs to have its value updated by its provider - var needsUpdate: Bool { get } - - /// The frame time of the last provided update - var lastUpdateFrame: CGFloat { get } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/KeypathSearchable.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/KeypathSearchable.swift deleted file mode 100644 index b46f524..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/KeypathSearchable.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// KeypathSettable.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/4/19. -// - -import Foundation -import QuartzCore - -/// Protocol that provides keypath search functionality. Returns all node properties associated with a keypath. -protocol KeypathSearchable { - - /// The name of the Keypath - var keypathName: String { get } - - /// A list of properties belonging to the keypath. - var keypathProperties: [String: AnyNodeProperty] { get } - - /// Children Keypaths - var childKeypaths: [KeypathSearchable] { get } - - var keypathLayer: CALayer? { get } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/NodePropertyMap.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/NodePropertyMap.swift deleted file mode 100644 index 07b101f..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/NodePropertyMap.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// NodePropertyMap.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/21/19. -// - -import Foundation -import QuartzCore - -// MARK: - NodePropertyMap - -protocol NodePropertyMap { - var properties: [AnyNodeProperty] { get } -} - -extension NodePropertyMap { - - var childKeypaths: [KeypathSearchable] { - [] - } - - var keypathLayer: CALayer? { - nil - } - - /// Checks if the node's local contents need to be rebuilt. - func needsLocalUpdate(frame: CGFloat) -> Bool { - for property in properties { - if property.needsUpdate(frame: frame) { - return true - } - } - return false - } - - /// Rebuilds only the local nodes that have an update for the frame - func updateNodeProperties(frame: CGFloat) { - properties.forEach { property in - property.update(frame: frame) - } - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueContainer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueContainer.swift deleted file mode 100644 index 7717090..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueContainer.swift +++ /dev/null @@ -1,47 +0,0 @@ -// -// ValueContainer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/30/19. -// - -import CoreGraphics -import Foundation - -/// A container for a node value that is Typed to T. -class ValueContainer: AnyValueContainer { - - // MARK: Lifecycle - - init(_ value: T) { - outputValue = value - } - - // MARK: Internal - - private(set) var lastUpdateFrame = CGFloat.infinity - - fileprivate(set) var needsUpdate = true - - var value: Any { - outputValue as Any - } - - var outputValue: T { - didSet { - needsUpdate = false - } - } - - func setValue(_ value: Any, forFrame: CGFloat) { - if let typedValue = value as? T { - needsUpdate = false - lastUpdateFrame = forFrame - outputValue = typedValue - } - } - - func setNeedsUpdate() { - needsUpdate = true - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueProviders/GroupInterpolator.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueProviders/GroupInterpolator.swift deleted file mode 100644 index 53c95b8..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueProviders/GroupInterpolator.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// KeyframeGroupInterpolator.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/22/19. -// - -import CoreGraphics -import Foundation - -/// A value provider that produces an array of values from an array of Keyframe Interpolators -final class GroupInterpolator: ValueProvider where ValueType: Interpolatable { - - // MARK: Lifecycle - - /// Initialize with an array of array of keyframes. - init(keyframeGroups: ContiguousArray>>) { - keyframeInterpolators = ContiguousArray(keyframeGroups.map { KeyframeInterpolator(keyframes: $0) }) - } - - // MARK: Internal - - let keyframeInterpolators: ContiguousArray> - - var valueType: Any.Type { - [ValueType].self - } - - var storage: ValueProviderStorage<[ValueType]> { - .closure { frame in - self.keyframeInterpolators.map { $0.value(frame: frame) as! ValueType } - } - } - - func hasUpdate(frame: CGFloat) -> Bool { - let updated = keyframeInterpolators.first(where: { $0.hasUpdate(frame: frame) }) - return updated != nil - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueProviders/SingleValueProvider.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueProviders/SingleValueProvider.swift deleted file mode 100644 index b4bff3a..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/NodeProperties/ValueProviders/SingleValueProvider.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// SingleValueProvider.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/30/19. -// - -import Foundation -import QuartzCore - -/// Returns a value for every frame. -final class SingleValueProvider: ValueProvider { - - // MARK: Lifecycle - - init(_ value: ValueType) { - self.value = value - } - - // MARK: Internal - - var value: ValueType { - didSet { - hasUpdate = true - } - } - - var storage: ValueProviderStorage { - .singleValue(value) - } - - var valueType: Any.Type { - ValueType.self - } - - func hasUpdate(frame _: CGFloat) -> Bool { - hasUpdate - } - - // MARK: Private - - private var hasUpdate = true -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/RoundedCornersNode.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/RoundedCornersNode.swift deleted file mode 100644 index 67be54b..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/RoundedCornersNode.swift +++ /dev/null @@ -1,85 +0,0 @@ -// -// RoundedCornersNode.swift -// Lottie -// -// Created by Duolingo on 10/31/22. -// - -import Foundation -import QuartzCore - -// MARK: - RoundedCornersProperties - -final class RoundedCornersProperties: NodePropertyMap, KeypathSearchable { - - // MARK: Lifecycle - - init(roundedCorners: RoundedCorners) { - keypathName = roundedCorners.name - radius = NodeProperty(provider: KeyframeInterpolator(keyframes: roundedCorners.radius.keyframes)) - keypathProperties = ["Radius" : radius] - properties = Array(keypathProperties.values) - } - - // MARK: Internal - - let keypathProperties: [String: AnyNodeProperty] - let properties: [AnyNodeProperty] - let keypathName: String - - let radius: NodeProperty -} - -// MARK: - RoundedCornersNode - -final class RoundedCornersNode: AnimatorNode { - - // MARK: Lifecycle - - init(parentNode: AnimatorNode?, roundedCorners: RoundedCorners, upstreamPaths: [PathOutputNode]) { - outputNode = PassThroughOutputNode(parent: parentNode?.outputNode) - self.parentNode = parentNode - properties = RoundedCornersProperties(roundedCorners: roundedCorners) - self.upstreamPaths = upstreamPaths - } - - // MARK: Internal - - let properties: RoundedCornersProperties - - let parentNode: AnimatorNode? - let outputNode: NodeOutput - var hasLocalUpdates = false - var hasUpstreamUpdates = false - var lastUpdateFrame: CGFloat? = nil - var isEnabled = true - - // MARK: Animator Node - var propertyMap: NodePropertyMap & KeypathSearchable { - properties - } - - func forceUpstreamOutputUpdates() -> Bool { - hasLocalUpdates || hasUpstreamUpdates - } - - func rebuildOutputs(frame: CGFloat) { - for pathContainer in upstreamPaths { - let pathObjects = pathContainer.removePaths(updateFrame: frame) - for path in pathObjects { - let cornerRadius = properties.radius.value.cgFloatValue - if cornerRadius != 0 { - pathContainer.appendPath( - path.roundCorners(radius: cornerRadius), - updateFrame: frame) - } else { - pathContainer.appendPath(path, updateFrame: frame) - } - } - } - } - - // MARK: Fileprivate - - fileprivate let upstreamPaths: [PathOutputNode] -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/TrimPathNode.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/TrimPathNode.swift deleted file mode 100644 index 2d0ec09..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/TrimPathNode.swift +++ /dev/null @@ -1,278 +0,0 @@ -// -// TrimPathNode.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/23/19. -// - -import Foundation -import QuartzCore - -// MARK: - TrimPathProperties - -final class TrimPathProperties: NodePropertyMap, KeypathSearchable { - - // MARK: Lifecycle - - init(trim: Trim) { - keypathName = trim.name - start = NodeProperty(provider: KeyframeInterpolator(keyframes: trim.start.keyframes)) - end = NodeProperty(provider: KeyframeInterpolator(keyframes: trim.end.keyframes)) - offset = NodeProperty(provider: KeyframeInterpolator(keyframes: trim.offset.keyframes)) - type = trim.trimType - keypathProperties = [ - "Start" : start, - "End" : end, - "Offset" : offset, - ] - properties = Array(keypathProperties.values) - } - - // MARK: Internal - - let keypathProperties: [String: AnyNodeProperty] - let properties: [AnyNodeProperty] - let keypathName: String - - let start: NodeProperty - let end: NodeProperty - let offset: NodeProperty - let type: TrimType -} - -// MARK: - TrimPathNode - -final class TrimPathNode: AnimatorNode { - - // MARK: Lifecycle - - init(parentNode: AnimatorNode?, trim: Trim, upstreamPaths: [PathOutputNode]) { - outputNode = PassThroughOutputNode(parent: parentNode?.outputNode) - self.parentNode = parentNode - properties = TrimPathProperties(trim: trim) - self.upstreamPaths = upstreamPaths - } - - // MARK: Internal - - let properties: TrimPathProperties - - let parentNode: AnimatorNode? - let outputNode: NodeOutput - var hasLocalUpdates = false - var hasUpstreamUpdates = false - var lastUpdateFrame: CGFloat? = nil - var isEnabled = true - - // MARK: Animator Node - var propertyMap: NodePropertyMap & KeypathSearchable { - properties - } - - func forceUpstreamOutputUpdates() -> Bool { - hasLocalUpdates || hasUpstreamUpdates - } - - func rebuildOutputs(frame: CGFloat) { - /// Make sure there is a trim. - let startValue = properties.start.value.cgFloatValue * 0.01 - let endValue = properties.end.value.cgFloatValue * 0.01 - let start = min(startValue, endValue) - let end = max(startValue, endValue) - - let offset = properties.offset.value.cgFloatValue.truncatingRemainder(dividingBy: 360) / 360 - - /// No need to trim, it's a full path - if start == 0, end == 1 { - return - } - - /// All paths are empty. - if start == end { - for pathContainer in upstreamPaths { - pathContainer.removePaths(updateFrame: frame) - } - return - } - - if properties.type == .simultaneously { - /// Just trim each path - for pathContainer in upstreamPaths { - let pathObjects = pathContainer.removePaths(updateFrame: frame) - for path in pathObjects { - // We are treating each compount path as an individual path. Its subpaths are treated as a whole. - pathContainer.appendPath( - path.trim(fromPosition: start, toPosition: end, offset: offset, trimSimultaneously: false), - updateFrame: frame) - } - } - return - } - - /// Individual path trimming. - - /// Brace yourself for the below code. - - /// Normalize lengths with offset. - var startPosition = (start + offset).truncatingRemainder(dividingBy: 1) - var endPosition = (end + offset).truncatingRemainder(dividingBy: 1) - - if startPosition < 0 { - startPosition = 1 + startPosition - } - - if endPosition < 0 { - endPosition = 1 + endPosition - } - if startPosition == 1 { - startPosition = 0 - } - if endPosition == 0 { - endPosition = 1 - } - - /// First get the total length of all paths. - var totalLength: CGFloat = 0 - upstreamPaths.forEach { totalLength = totalLength + $0.totalLength } - - /// Now determine the start and end cut lengths - let startLength = startPosition * totalLength - let endLength = endPosition * totalLength - var pathStart: CGFloat = 0 - - /// Now loop through all path containers - for pathContainer in upstreamPaths { - let pathEnd = pathStart + pathContainer.totalLength - - if - !startLength.isInRange(pathStart, pathEnd) && - endLength.isInRange(pathStart, pathEnd) - { - // pathStart|=======E----------------------|pathEnd - // Cut path components, removing after end. - - let pathCutLength = endLength - pathStart - let subpaths = pathContainer.removePaths(updateFrame: frame) - var subpathStart: CGFloat = 0 - for path in subpaths { - let subpathEnd = subpathStart + path.length - if pathCutLength < subpathEnd { - /// This is the subpath that needs to be cut. - let cutLength = pathCutLength - subpathStart - let newPath = path.trim(fromPosition: 0, toPosition: cutLength / path.length, offset: 0, trimSimultaneously: false) - pathContainer.appendPath(newPath, updateFrame: frame) - break - } else { - /// Add to container and move on - pathContainer.appendPath(path, updateFrame: frame) - } - if pathCutLength == subpathEnd { - /// Right on the end. The next subpath is not included. Break. - break - } - subpathStart = subpathEnd - } - - } else if - !endLength.isInRange(pathStart, pathEnd) && - startLength.isInRange(pathStart, pathEnd) - { - // pathStart|-------S======================|pathEnd - // - - // Cut path components, removing before beginning. - let pathCutLength = startLength - pathStart - // Clear paths from container - let subpaths = pathContainer.removePaths(updateFrame: frame) - var subpathStart: CGFloat = 0 - for path in subpaths { - let subpathEnd = subpathStart + path.length - - if subpathStart < pathCutLength, pathCutLength < subpathEnd { - /// This is the subpath that needs to be cut. - let cutLength = pathCutLength - subpathStart - let newPath = path.trim(fromPosition: cutLength / path.length, toPosition: 1, offset: 0, trimSimultaneously: false) - pathContainer.appendPath(newPath, updateFrame: frame) - } else if pathCutLength <= subpathStart { - pathContainer.appendPath(path, updateFrame: frame) - } - subpathStart = subpathEnd - } - } else if - endLength.isInRange(pathStart, pathEnd) && - startLength.isInRange(pathStart, pathEnd) - { - // pathStart|-------S============E---------|endLength - // pathStart|=====E----------------S=======|endLength - // trim from path beginning to endLength. - - // Cut path components, removing before beginnings. - let startCutLength = startLength - pathStart - let endCutLength = endLength - pathStart - // Clear paths from container - let subpaths = pathContainer.removePaths(updateFrame: frame) - var subpathStart: CGFloat = 0 - for path in subpaths { - let subpathEnd = subpathStart + path.length - - if - !startCutLength.isInRange(subpathStart, subpathEnd), - !endCutLength.isInRange(subpathStart, subpathEnd) - { - // The whole path is included. Add - // S|==============================|E - pathContainer.appendPath(path, updateFrame: frame) - - } else if - startCutLength.isInRange(subpathStart, subpathEnd), - !endCutLength.isInRange(subpathStart, subpathEnd) - { - /// The start of the path needs to be trimmed - // |-------S======================|E - let cutLength = startCutLength - subpathStart - let newPath = path.trim(fromPosition: cutLength / path.length, toPosition: 1, offset: 0, trimSimultaneously: false) - pathContainer.appendPath(newPath, updateFrame: frame) - } else if - !startCutLength.isInRange(subpathStart, subpathEnd), - endCutLength.isInRange(subpathStart, subpathEnd) - { - // S|=======E----------------------| - let cutLength = endCutLength - subpathStart - let newPath = path.trim(fromPosition: 0, toPosition: cutLength / path.length, offset: 0, trimSimultaneously: false) - pathContainer.appendPath(newPath, updateFrame: frame) - break - } else if - startCutLength.isInRange(subpathStart, subpathEnd), - endCutLength.isInRange(subpathStart, subpathEnd) - { - // |-------S============E---------| - let cutFromLength = startCutLength - subpathStart - let cutToLength = endCutLength - subpathStart - let newPath = path.trim( - fromPosition: cutFromLength / path.length, - toPosition: cutToLength / path.length, - offset: 0, - trimSimultaneously: false) - pathContainer.appendPath(newPath, updateFrame: frame) - break - } - - subpathStart = subpathEnd - } - } else if - (endLength <= pathStart && pathEnd <= startLength) || - (startLength <= pathStart && endLength <= pathStart) || - (pathEnd <= startLength && pathEnd <= endLength) - { - /// The Path needs to be cleared - pathContainer.removePaths(updateFrame: frame) - } - - pathStart = pathEnd - } - } - - // MARK: Fileprivate - - fileprivate let upstreamPaths: [PathOutputNode] -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/GroupOutputNode.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/GroupOutputNode.swift deleted file mode 100644 index 0e782d4..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/GroupOutputNode.swift +++ /dev/null @@ -1,76 +0,0 @@ -// -// TransformNodeOutput.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/30/19. -// - -import CoreGraphics -import Foundation -import QuartzCore - -class GroupOutputNode: NodeOutput { - - // MARK: Lifecycle - - init(parent: NodeOutput?, rootNode: NodeOutput?) { - self.parent = parent - self.rootNode = rootNode - } - - // MARK: Internal - - let parent: NodeOutput? - let rootNode: NodeOutput? - var isEnabled = true - - private(set) var outputPath: CGPath? = nil - private(set) var transform: CATransform3D = CATransform3DIdentity - - func setTransform(_ xform: CATransform3D, forFrame _: CGFloat) { - transform = xform - outputPath = nil - } - - func hasOutputUpdates(_ forFrame: CGFloat) -> Bool { - guard isEnabled else { - let upstreamUpdates = parent?.hasOutputUpdates(forFrame) ?? false - outputPath = parent?.outputPath - return upstreamUpdates - } - - let upstreamUpdates = parent?.hasOutputUpdates(forFrame) ?? false - if upstreamUpdates { - outputPath = nil - } - let rootUpdates = rootNode?.hasOutputUpdates(forFrame) ?? false - if rootUpdates { - outputPath = nil - } - - var localUpdates = false - if outputPath == nil { - localUpdates = true - - let newPath = CGMutablePath() - if let parentNode = parent, let parentPath = parentNode.outputPath { - /// First add parent path. - newPath.addPath(parentPath) - } - var xform = CATransform3DGetAffineTransform(transform) - if - let rootNode = rootNode, - let rootPath = rootNode.outputPath, - let xformedPath = rootPath.copy(using: &xform) - { - /// Now add root path. Note root path is transformed. - newPath.addPath(xformedPath) - } - - outputPath = newPath - } - - return upstreamUpdates || localUpdates - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PassThroughOutputNode.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PassThroughOutputNode.swift deleted file mode 100644 index 6518d9c..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PassThroughOutputNode.swift +++ /dev/null @@ -1,47 +0,0 @@ -// -// PassThroughOutputNode.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/30/19. -// - -import CoreGraphics -import Foundation - -class PassThroughOutputNode: NodeOutput { - - // MARK: Lifecycle - - init(parent: NodeOutput?) { - self.parent = parent - } - - // MARK: Internal - - let parent: NodeOutput? - - var hasUpdate = false - var isEnabled = true - - var outputPath: CGPath? { - if let parent = parent { - return parent.outputPath - } - return nil - } - - func hasOutputUpdates(_ forFrame: CGFloat) -> Bool { - /// Changes to this node do not affect downstream nodes. - let parentUpdate = parent?.hasOutputUpdates(forFrame) ?? false - /// Changes to upstream nodes do, however, affect this nodes state. - hasUpdate = hasUpdate || parentUpdate - return parentUpdate - } - - func hasRenderUpdates(_ forFrame: CGFloat) -> Bool { - /// Return true if there are upstream updates or if this node has updates - let upstreamUpdates = parent?.hasOutputUpdates(forFrame) ?? false - hasUpdate = hasUpdate || upstreamUpdates - return hasUpdate - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PathOutputNode.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PathOutputNode.swift deleted file mode 100644 index 74d153f..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PathOutputNode.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// PathNodeOutput.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/30/19. -// - -import CoreGraphics -import Foundation - -/// A node that has an output of a BezierPath -class PathOutputNode: NodeOutput { - - // MARK: Lifecycle - - init(parent: NodeOutput?) { - self.parent = parent - } - - // MARK: Internal - - let parent: NodeOutput? - - fileprivate(set) var outputPath: CGPath? = nil - - var lastUpdateFrame: CGFloat? = nil - var lastPathBuildFrame: CGFloat? = nil - var isEnabled = true - fileprivate(set) var totalLength: CGFloat = 0 - fileprivate(set) var pathObjects: [CompoundBezierPath] = [] - - func hasOutputUpdates(_ forFrame: CGFloat) -> Bool { - guard isEnabled else { - let upstreamUpdates = parent?.hasOutputUpdates(forFrame) ?? false - outputPath = parent?.outputPath - return upstreamUpdates - } - - /// Ask if parent was updated - let upstreamUpdates = parent?.hasOutputUpdates(forFrame) ?? false - - /// If parent was updated and the path hasn't been built for this frame, clear the path. - if upstreamUpdates && lastPathBuildFrame != forFrame { - outputPath = nil - } - - if outputPath == nil { - /// If the path is clear, build the new path. - lastPathBuildFrame = forFrame - let newPath = CGMutablePath() - if let parentNode = parent, let parentPath = parentNode.outputPath { - newPath.addPath(parentPath) - } - for path in pathObjects { - for subPath in path.paths { - newPath.addPath(subPath.cgPath()) - } - } - outputPath = newPath - } - - /// Return true if there were upstream updates or if this node was updated. - return upstreamUpdates || (lastUpdateFrame == forFrame) - } - - @discardableResult - func removePaths(updateFrame: CGFloat?) -> [CompoundBezierPath] { - lastUpdateFrame = updateFrame - let returnPaths = pathObjects - outputPath = nil - totalLength = 0 - pathObjects = [] - return returnPaths - } - - func setPath(_ path: BezierPath, updateFrame: CGFloat) { - lastUpdateFrame = updateFrame - outputPath = nil - totalLength = path.length - pathObjects = [CompoundBezierPath(path: path)] - } - - func appendPath(_ path: CompoundBezierPath, updateFrame: CGFloat) { - lastUpdateFrame = updateFrame - outputPath = nil - totalLength = totalLength + path.length - pathObjects.append(path) - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/FillRenderer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/FillRenderer.swift deleted file mode 100644 index 1631ea9..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/FillRenderer.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// FillRenderer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/30/19. -// - -import CoreGraphics -import Foundation -import QuartzCore - -extension FillRule { - var cgFillRule: CGPathFillRule { - switch self { - case .evenOdd: - return .evenOdd - default: - return .winding - } - } - - var caFillRule: CAShapeLayerFillRule { - switch self { - case .evenOdd: - return CAShapeLayerFillRule.evenOdd - default: - return CAShapeLayerFillRule.nonZero - } - } -} - -// MARK: - FillRenderer - -/// A rendered for a Path Fill -final class FillRenderer: PassThroughOutputNode, Renderable { - var shouldRenderInContext = false - - var color: CGColor? { - didSet { - hasUpdate = true - } - } - - var opacity: CGFloat = 0 { - didSet { - hasUpdate = true - } - } - - var fillRule: FillRule = .none { - didSet { - hasUpdate = true - } - } - - func render(_: CGContext) { - // do nothing - } - - func setupSublayers(layer _: CAShapeLayer) { - // do nothing - } - - func updateShapeLayer(layer: CAShapeLayer) { - layer.fillColor = color - layer.opacity = Float(opacity) - layer.fillRule = fillRule.caFillRule - hasUpdate = false - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientFillRenderer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientFillRenderer.swift deleted file mode 100644 index abf003b..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientFillRenderer.swift +++ /dev/null @@ -1,246 +0,0 @@ -// -// GradientFillRenderer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/30/19. -// - -import Foundation -import QuartzCore - -// MARK: - GradientFillLayer - -private final class GradientFillLayer: CALayer { - - var start: CGPoint = .zero { - didSet { - setNeedsDisplay() - } - } - - var numberOfColors = 0 { - didSet { - setNeedsDisplay() - } - } - - var colors: [CGFloat] = [] { - didSet { - setNeedsDisplay() - } - } - - var end: CGPoint = .zero { - didSet { - setNeedsDisplay() - } - } - - var type: GradientType = .none { - didSet { - setNeedsDisplay() - } - } - - override func draw(in ctx: CGContext) { - var alphaColors = [CGColor]() - var alphaLocations = [CGFloat]() - - var gradientColors = [CGColor]() - var colorLocations = [CGFloat]() - let maskColorSpace = CGColorSpaceCreateDeviceGray() - for i in 0.. ix { - let color = CGColor.rgb(colors[ix + 1], colors[ix + 2], colors[ix + 3]) - gradientColors.append(color) - colorLocations.append(colors[ix]) - } - } - - var drawMask = false - for i in stride(from: numberOfColors * 4, to: colors.endIndex, by: 2) { - let alpha = colors[i + 1] - if alpha < 1 { - drawMask = true - } - alphaLocations.append(colors[i]) - alphaColors.append(.gray(alpha)) - } - - /// First draw a mask is necessary. - if drawMask { - guard - let maskGradient = CGGradient( - colorsSpace: maskColorSpace, - colors: alphaColors as CFArray, - locations: alphaLocations), - let maskContext = CGContext( - data: nil, - width: ctx.width, - height: ctx.height, - bitsPerComponent: 8, - bytesPerRow: ctx.width, - space: maskColorSpace, - bitmapInfo: 0) else { return } - let flipVertical = CGAffineTransform(a: 1, b: 0, c: 0, d: -1, tx: 0, ty: CGFloat(maskContext.height)) - maskContext.concatenate(flipVertical) - maskContext.concatenate(ctx.ctm) - if type == .linear { - maskContext.drawLinearGradient( - maskGradient, - start: start, - end: end, - options: [.drawsAfterEndLocation, .drawsBeforeStartLocation]) - } else { - maskContext.drawRadialGradient( - maskGradient, - startCenter: start, - startRadius: 0, - endCenter: start, - endRadius: start.distanceTo(end), - options: [.drawsAfterEndLocation, .drawsBeforeStartLocation]) - } - /// Clips the gradient - if let alphaMask = maskContext.makeImage() { - ctx.clip(to: ctx.boundingBoxOfClipPath, mask: alphaMask) - } - } - - /// Now draw the gradient - guard - let gradient = CGGradient( - colorsSpace: LottieConfiguration.shared.colorSpace, - colors: gradientColors as CFArray, - locations: colorLocations) - else { return } - - if type == .linear { - ctx.drawLinearGradient(gradient, start: start, end: end, options: [.drawsAfterEndLocation, .drawsBeforeStartLocation]) - } else { - ctx.drawRadialGradient( - gradient, - startCenter: start, - startRadius: 0, - endCenter: start, - endRadius: start.distanceTo(end), - options: [.drawsAfterEndLocation, .drawsBeforeStartLocation]) - } - } - -} - -// MARK: - GradientFillRenderer - -/// A rendered for a Path Fill -final class GradientFillRenderer: PassThroughOutputNode, Renderable { - - // MARK: Lifecycle - - override init(parent: NodeOutput?) { - super.init(parent: parent) - - maskLayer.fillColor = .rgb(1, 1, 1) - gradientLayer.mask = maskLayer - - maskLayer.actions = [ - "startPoint" : NSNull(), - "endPoint" : NSNull(), - "opacity" : NSNull(), - "locations" : NSNull(), - "colors" : NSNull(), - "bounds" : NSNull(), - "anchorPoint" : NSNull(), - "isRadial" : NSNull(), - "path" : NSNull(), - ] - gradientLayer.actions = maskLayer.actions - } - - // MARK: Internal - - var shouldRenderInContext = false - - var start: CGPoint = .zero { - didSet { - hasUpdate = true - } - } - - var numberOfColors = 0 { - didSet { - hasUpdate = true - } - } - - var colors: [CGFloat] = [] { - didSet { - hasUpdate = true - } - } - - var end: CGPoint = .zero { - didSet { - hasUpdate = true - } - } - - var opacity: CGFloat = 0 { - didSet { - hasUpdate = true - } - } - - var type: GradientType = .none { - didSet { - hasUpdate = true - } - } - - var fillRule: CAShapeLayerFillRule { - get { maskLayer.fillRule } - set { maskLayer.fillRule = newValue } - } - - func render(_: CGContext) { - // do nothing - } - - func setupSublayers(layer: CAShapeLayer) { - layer.addSublayer(gradientLayer) - layer.fillColor = nil - } - - func updateShapeLayer(layer: CAShapeLayer) { - hasUpdate = false - - guard let path = layer.path else { - return - } - - let frame = path.boundingBox - let anchor = CGPoint( - x: -frame.origin.x / frame.size.width, - y: -frame.origin.y / frame.size.height) - maskLayer.path = path - maskLayer.bounds = path.boundingBox - maskLayer.anchorPoint = anchor - - gradientLayer.bounds = maskLayer.bounds - gradientLayer.anchorPoint = anchor - - // setup gradient properties - gradientLayer.start = start - gradientLayer.end = end - gradientLayer.numberOfColors = numberOfColors - gradientLayer.colors = colors - gradientLayer.opacity = Float(opacity) - gradientLayer.type = type - } - - // MARK: Private - - private let gradientLayer = GradientFillLayer() - private let maskLayer = CAShapeLayer() - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientStrokeRenderer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientStrokeRenderer.swift deleted file mode 100644 index 7ac8267..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientStrokeRenderer.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// GradientStrokeRenderer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/30/19. -// - -import Foundation -import QuartzCore - -// MARK: - Renderer - -final class GradientStrokeRenderer: PassThroughOutputNode, Renderable { - - // MARK: Lifecycle - - override init(parent: NodeOutput?) { - strokeRender = StrokeRenderer(parent: nil) - gradientRender = LegacyGradientFillRenderer(parent: nil) - strokeRender.color = .rgb(1, 1, 1) - super.init(parent: parent) - } - - // MARK: Internal - - var shouldRenderInContext = true - - let strokeRender: StrokeRenderer - let gradientRender: LegacyGradientFillRenderer - - override func hasOutputUpdates(_ forFrame: CGFloat) -> Bool { - let updates = super.hasOutputUpdates(forFrame) - return updates || strokeRender.hasUpdate || gradientRender.hasUpdate - } - - func updateShapeLayer(layer _: CAShapeLayer) { - /// Not Applicable - } - - func setupSublayers(layer _: CAShapeLayer) { - /// Not Applicable - } - - func render(_ inContext: CGContext) { - guard inContext.path != nil, inContext.path!.isEmpty == false else { - return - } - - strokeRender.hasUpdate = false - hasUpdate = false - gradientRender.hasUpdate = false - - strokeRender.setupForStroke(inContext) - - inContext.replacePathWithStrokedPath() - - /// Now draw the gradient. - gradientRender.render(inContext) - } - - func renderBoundsFor(_ boundingBox: CGRect) -> CGRect { - strokeRender.renderBoundsFor(boundingBox) - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/LegacyGradientFillRenderer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/LegacyGradientFillRenderer.swift deleted file mode 100644 index 39d6842..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/LegacyGradientFillRenderer.swift +++ /dev/null @@ -1,152 +0,0 @@ -// -// LegacyGradientFillRenderer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/30/19. -// - -import Foundation -import QuartzCore - -/// A rendered for a Path Fill -final class LegacyGradientFillRenderer: PassThroughOutputNode, Renderable { - - var shouldRenderInContext = true - - var start: CGPoint = .zero { - didSet { - hasUpdate = true - } - } - - var numberOfColors = 0 { - didSet { - hasUpdate = true - } - } - - var colors: [CGFloat] = [] { - didSet { - hasUpdate = true - } - } - - var end: CGPoint = .zero { - didSet { - hasUpdate = true - } - } - - var opacity: CGFloat = 0 { - didSet { - hasUpdate = true - } - } - - var type: GradientType = .none { - didSet { - hasUpdate = true - } - } - - func updateShapeLayer(layer _: CAShapeLayer) { - // Not applicable - } - - func setupSublayers(layer _: CAShapeLayer) { - // Not applicable - } - - func render(_ inContext: CGContext) { - guard inContext.path != nil, inContext.path!.isEmpty == false else { - return - } - hasUpdate = false - var alphaColors = [CGColor]() - var alphaLocations = [CGFloat]() - - var gradientColors = [CGColor]() - var colorLocations = [CGFloat]() - let maskColorSpace = CGColorSpaceCreateDeviceGray() - for i in 0.. ix { - let color = CGColor.rgb(colors[ix + 1], colors[ix + 2], colors[ix + 3]) - gradientColors.append(color) - colorLocations.append(colors[ix]) - } - } - - var drawMask = false - for i in stride(from: numberOfColors * 4, to: colors.endIndex, by: 2) { - let alpha = colors[i + 1] - if alpha < 1 { - drawMask = true - } - alphaLocations.append(colors[i]) - alphaColors.append(.gray(alpha)) - } - - inContext.setAlpha(opacity) - inContext.clip() - - /// First draw a mask is necessary. - if drawMask { - guard - let maskGradient = CGGradient( - colorsSpace: maskColorSpace, - colors: alphaColors as CFArray, - locations: alphaLocations), - let maskContext = CGContext( - data: nil, - width: inContext.width, - height: inContext.height, - bitsPerComponent: 8, - bytesPerRow: inContext.width, - space: maskColorSpace, - bitmapInfo: 0) else { return } - let flipVertical = CGAffineTransform(a: 1, b: 0, c: 0, d: -1, tx: 0, ty: CGFloat(maskContext.height)) - maskContext.concatenate(flipVertical) - maskContext.concatenate(inContext.ctm) - if type == .linear { - maskContext.drawLinearGradient( - maskGradient, - start: start, - end: end, - options: [.drawsAfterEndLocation, .drawsBeforeStartLocation]) - } else { - maskContext.drawRadialGradient( - maskGradient, - startCenter: start, - startRadius: 0, - endCenter: start, - endRadius: start.distanceTo(end), - options: [.drawsAfterEndLocation, .drawsBeforeStartLocation]) - } - /// Clips the gradient - if let alphaMask = maskContext.makeImage() { - inContext.clip(to: inContext.boundingBoxOfClipPath, mask: alphaMask) - } - } - - /// Now draw the gradient - guard - let gradient = CGGradient( - colorsSpace: LottieConfiguration.shared.colorSpace, - colors: gradientColors as CFArray, - locations: colorLocations) - else { return } - - if type == .linear { - inContext.drawLinearGradient(gradient, start: start, end: end, options: [.drawsAfterEndLocation, .drawsBeforeStartLocation]) - } else { - inContext.drawRadialGradient( - gradient, - startCenter: start, - startRadius: 0, - endCenter: start, - endRadius: start.distanceTo(end), - options: [.drawsAfterEndLocation, .drawsBeforeStartLocation]) - } - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/StrokeRenderer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/StrokeRenderer.swift deleted file mode 100644 index 39c0668..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/StrokeRenderer.swift +++ /dev/null @@ -1,166 +0,0 @@ -// -// StrokeRenderer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/30/19. -// - -import Foundation -import QuartzCore - -extension LineJoin { - var cgLineJoin: CGLineJoin { - switch self { - case .bevel: - return .bevel - case .none: - return .miter - case .miter: - return .miter - case .round: - return .round - } - } - - var caLineJoin: CAShapeLayerLineJoin { - switch self { - case .none: - return CAShapeLayerLineJoin.miter - case .miter: - return CAShapeLayerLineJoin.miter - case .round: - return CAShapeLayerLineJoin.round - case .bevel: - return CAShapeLayerLineJoin.bevel - } - } -} - -extension LineCap { - var cgLineCap: CGLineCap { - switch self { - case .none: - return .butt - case .butt: - return .butt - case .round: - return .round - case .square: - return .square - } - } - - var caLineCap: CAShapeLayerLineCap { - switch self { - case .none: - return CAShapeLayerLineCap.butt - case .butt: - return CAShapeLayerLineCap.butt - case .round: - return CAShapeLayerLineCap.round - case .square: - return CAShapeLayerLineCap.square - } - } -} - -// MARK: - StrokeRenderer - -/// A rendered that renders a stroke on a path. -final class StrokeRenderer: PassThroughOutputNode, Renderable { - - var shouldRenderInContext = false - - var color: CGColor? { - didSet { - hasUpdate = true - } - } - - var opacity: CGFloat = 0 { - didSet { - hasUpdate = true - } - } - - var width: CGFloat = 0 { - didSet { - hasUpdate = true - } - } - - var miterLimit: CGFloat = 0 { - didSet { - hasUpdate = true - } - } - - var lineCap: LineCap = .none { - didSet { - hasUpdate = true - } - } - - var lineJoin: LineJoin = .none { - didSet { - hasUpdate = true - } - } - - var dashPhase: CGFloat? { - didSet { - hasUpdate = true - } - } - - var dashLengths: [CGFloat]? { - didSet { - hasUpdate = true - } - } - - func setupSublayers(layer _: CAShapeLayer) { - // empty - } - - func renderBoundsFor(_ boundingBox: CGRect) -> CGRect { - boundingBox.insetBy(dx: -width, dy: -width) - } - - func setupForStroke(_ inContext: CGContext) { - inContext.setLineWidth(width) - inContext.setMiterLimit(miterLimit) - inContext.setLineCap(lineCap.cgLineCap) - inContext.setLineJoin(lineJoin.cgLineJoin) - if let dashPhase = dashPhase, let lengths = dashLengths { - inContext.setLineDash(phase: dashPhase, lengths: lengths) - } else { - inContext.setLineDash(phase: 0, lengths: []) - } - } - - func render(_ inContext: CGContext) { - guard inContext.path != nil, inContext.path!.isEmpty == false else { - return - } - guard let color = color else { return } - hasUpdate = false - setupForStroke(inContext) - inContext.setAlpha(opacity) - inContext.setStrokeColor(color) - inContext.strokePath() - } - - func updateShapeLayer(layer: CAShapeLayer) { - layer.strokeColor = color - layer.opacity = Float(opacity) - layer.lineWidth = width - layer.lineJoin = lineJoin.caLineJoin - layer.lineCap = lineCap.caLineCap - layer.lineDashPhase = dashPhase ?? 0 - layer.fillColor = nil - if let dashPattern = dashLengths { - layer.lineDashPattern = dashPattern.map { NSNumber(value: Double($0)) } - } - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/EllipseNode.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/EllipseNode.swift deleted file mode 100644 index a5c40e6..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/EllipseNode.swift +++ /dev/null @@ -1,139 +0,0 @@ -// -// EllipseNode.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/17/19. -// - -import Foundation -import QuartzCore - -// MARK: - EllipseNodeProperties - -final class EllipseNodeProperties: NodePropertyMap, KeypathSearchable { - - // MARK: Lifecycle - - init(ellipse: Ellipse) { - keypathName = ellipse.name - direction = ellipse.direction - position = NodeProperty(provider: KeyframeInterpolator(keyframes: ellipse.position.keyframes)) - size = NodeProperty(provider: KeyframeInterpolator(keyframes: ellipse.size.keyframes)) - keypathProperties = [ - PropertyName.position.rawValue : position, - "Size" : size, - ] - properties = Array(keypathProperties.values) - } - - // MARK: Internal - - var keypathName: String - - let direction: PathDirection - let position: NodeProperty - let size: NodeProperty - - let keypathProperties: [String: AnyNodeProperty] - let properties: [AnyNodeProperty] -} - -// MARK: - EllipseNode - -final class EllipseNode: AnimatorNode, PathNode { - - // MARK: Lifecycle - - init(parentNode: AnimatorNode?, ellipse: Ellipse) { - pathOutput = PathOutputNode(parent: parentNode?.outputNode) - properties = EllipseNodeProperties(ellipse: ellipse) - self.parentNode = parentNode - } - - // MARK: Internal - - static let ControlPointConstant: CGFloat = 0.55228 - - let pathOutput: PathOutputNode - - let properties: EllipseNodeProperties - - let parentNode: AnimatorNode? - var hasLocalUpdates = false - var hasUpstreamUpdates = false - var lastUpdateFrame: CGFloat? = nil - - // MARK: Animator Node - - var propertyMap: NodePropertyMap & KeypathSearchable { - properties - } - - var isEnabled = true { - didSet { - pathOutput.isEnabled = isEnabled - } - } - - func rebuildOutputs(frame: CGFloat) { - pathOutput.setPath( - .ellipse( - size: properties.size.value.sizeValue, - center: properties.position.value.pointValue, - direction: properties.direction), - updateFrame: frame) - } - -} - -extension BezierPath { - /// Constructs a `BezierPath` in the shape of an ellipse - static func ellipse( - size: CGSize, - center: CGPoint, - direction: PathDirection) - -> BezierPath - { - // Unfortunately we HAVE to manually build out the ellipse. - // Every Apple method constructs an ellipse from the 3 o-clock position - // After effects constructs from the Noon position. - // After effects does clockwise, but also has a flag for reversed. - var half = size * 0.5 - if direction == .counterClockwise { - half.width = half.width * -1 - } - - let q1 = CGPoint(x: center.x, y: center.y - half.height) - let q2 = CGPoint(x: center.x + half.width, y: center.y) - let q3 = CGPoint(x: center.x, y: center.y + half.height) - let q4 = CGPoint(x: center.x - half.width, y: center.y) - - let cp = half * EllipseNode.ControlPointConstant - - var path = BezierPath(startPoint: CurveVertex( - point: q1, - inTangentRelative: CGPoint(x: -cp.width, y: 0), - outTangentRelative: CGPoint(x: cp.width, y: 0))) - path.addVertex(CurveVertex( - point: q2, - inTangentRelative: CGPoint(x: 0, y: -cp.height), - outTangentRelative: CGPoint(x: 0, y: cp.height))) - - path.addVertex(CurveVertex( - point: q3, - inTangentRelative: CGPoint(x: cp.width, y: 0), - outTangentRelative: CGPoint(x: -cp.width, y: 0))) - - path.addVertex(CurveVertex( - point: q4, - inTangentRelative: CGPoint(x: 0, y: cp.height), - outTangentRelative: CGPoint(x: 0, y: -cp.height))) - - path.addVertex(CurveVertex( - point: q1, - inTangentRelative: CGPoint(x: -cp.width, y: 0), - outTangentRelative: CGPoint(x: cp.width, y: 0))) - path.close() - return path - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/PolygonNode.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/PolygonNode.swift deleted file mode 100644 index ba8aaf4..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/PolygonNode.swift +++ /dev/null @@ -1,170 +0,0 @@ -// -// PolygonNode.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/21/19. -// - -import Foundation -import QuartzCore - -// MARK: - PolygonNodeProperties - -final class PolygonNodeProperties: NodePropertyMap, KeypathSearchable { - - // MARK: Lifecycle - - init(star: Star) { - keypathName = star.name - direction = star.direction - position = NodeProperty(provider: KeyframeInterpolator(keyframes: star.position.keyframes)) - outerRadius = NodeProperty(provider: KeyframeInterpolator(keyframes: star.outerRadius.keyframes)) - outerRoundedness = NodeProperty(provider: KeyframeInterpolator(keyframes: star.outerRoundness.keyframes)) - rotation = NodeProperty(provider: KeyframeInterpolator(keyframes: star.rotation.keyframes)) - points = NodeProperty(provider: KeyframeInterpolator(keyframes: star.points.keyframes)) - keypathProperties = [ - PropertyName.position.rawValue : position, - "Outer Radius" : outerRadius, - "Outer Roundedness" : outerRoundedness, - PropertyName.rotation.rawValue : rotation, - "Points" : points, - ] - properties = Array(keypathProperties.values) - } - - // MARK: Internal - - var keypathName: String - - var childKeypaths: [KeypathSearchable] = [] - - let keypathProperties: [String: AnyNodeProperty] - let properties: [AnyNodeProperty] - - let direction: PathDirection - let position: NodeProperty - let outerRadius: NodeProperty - let outerRoundedness: NodeProperty - let rotation: NodeProperty - let points: NodeProperty -} - -// MARK: - PolygonNode - -final class PolygonNode: AnimatorNode, PathNode { - - // MARK: Lifecycle - - init(parentNode: AnimatorNode?, star: Star) { - pathOutput = PathOutputNode(parent: parentNode?.outputNode) - properties = PolygonNodeProperties(star: star) - self.parentNode = parentNode - } - - // MARK: Internal - - /// Magic number needed for constructing path. - static let PolygonConstant: CGFloat = 0.25 - - let properties: PolygonNodeProperties - - let pathOutput: PathOutputNode - - let parentNode: AnimatorNode? - var hasLocalUpdates = false - var hasUpstreamUpdates = false - var lastUpdateFrame: CGFloat? = nil - - // MARK: Animator Node - - var propertyMap: NodePropertyMap & KeypathSearchable { - properties - } - - var isEnabled = true { - didSet { - pathOutput.isEnabled = isEnabled - } - } - - func rebuildOutputs(frame: CGFloat) { - let path = BezierPath.polygon( - position: properties.position.value.pointValue, - numberOfPoints: properties.points.value.cgFloatValue, - outerRadius: properties.outerRadius.value.cgFloatValue, - outerRoundedness: properties.outerRoundedness.value.cgFloatValue, - rotation: properties.rotation.value.cgFloatValue, - direction: properties.direction) - - pathOutput.setPath(path, updateFrame: frame) - } - -} - -extension BezierPath { - /// Creates a `BezierPath` in the shape of a polygon - static func polygon( - position: CGPoint, - numberOfPoints: CGFloat, - outerRadius: CGFloat, - outerRoundedness inputOuterRoundedness: CGFloat, - rotation: CGFloat, - direction: PathDirection) - -> BezierPath - { - var currentAngle = (rotation - 90).toRadians() - let anglePerPoint = ((2 * CGFloat.pi) / numberOfPoints) - let outerRoundedness = inputOuterRoundedness * 0.01 - - var point = CGPoint( - x: outerRadius * cos(currentAngle), - y: outerRadius * sin(currentAngle)) - var vertices = [CurveVertex(point: point + position, inTangentRelative: .zero, outTangentRelative: .zero)] - - var previousPoint = point - currentAngle += anglePerPoint; - for _ in 0.. - let size: NodeProperty - let cornerRadius: NodeProperty - -} - -// MARK: - RectangleNode - -final class RectangleNode: AnimatorNode, PathNode { - - // MARK: Lifecycle - - init(parentNode: AnimatorNode?, rectangle: Rectangle) { - properties = RectNodeProperties(rectangle: rectangle) - pathOutput = PathOutputNode(parent: parentNode?.outputNode) - self.parentNode = parentNode - } - - // MARK: Internal - - let properties: RectNodeProperties - - let pathOutput: PathOutputNode - let parentNode: AnimatorNode? - var hasLocalUpdates = false - var hasUpstreamUpdates = false - var lastUpdateFrame: CGFloat? = nil - - // MARK: Animator Node - - var propertyMap: NodePropertyMap & KeypathSearchable { - properties - } - - var isEnabled = true { - didSet { - pathOutput.isEnabled = isEnabled - } - } - - func rebuildOutputs(frame: CGFloat) { - pathOutput.setPath( - .rectangle( - position: properties.position.value.pointValue, - size: properties.size.value.sizeValue, - cornerRadius: properties.cornerRadius.value.cgFloatValue, - direction: properties.direction), - updateFrame: frame) - } - -} - -// MARK: - BezierPath + rectangle - -extension BezierPath { - /// Constructs a `BezierPath` in the shape of a rectangle, optionally with rounded corners - static func rectangle( - position: CGPoint, - size inputSize: CGSize, - cornerRadius: CGFloat, - direction: PathDirection) - -> BezierPath - { - let size = inputSize * 0.5 - let radius = min(min(cornerRadius, size.width) , size.height) - - var bezierPath = BezierPath() - let points: [CurveVertex] - - if radius <= 0 { - /// No Corners - points = [ - /// Lead In - CurveVertex( - point: CGPoint(x: size.width, y: -size.height), - inTangentRelative: .zero, - outTangentRelative: .zero) - .translated(position), - /// Corner 1 - CurveVertex( - point: CGPoint(x: size.width, y: size.height), - inTangentRelative: .zero, - outTangentRelative: .zero) - .translated(position), - /// Corner 2 - CurveVertex( - point: CGPoint(x: -size.width, y: size.height), - inTangentRelative: .zero, - outTangentRelative: .zero) - .translated(position), - /// Corner 3 - CurveVertex( - point: CGPoint(x: -size.width, y: -size.height), - inTangentRelative: .zero, - outTangentRelative: .zero) - .translated(position), - /// Corner 4 - CurveVertex( - point: CGPoint(x: size.width, y: -size.height), - inTangentRelative: .zero, - outTangentRelative: .zero) - .translated(position), - ] - } else { - let controlPoint = radius * EllipseNode.ControlPointConstant - points = [ - /// Lead In - CurveVertex( - CGPoint(x: radius, y: 0), - CGPoint(x: radius, y: 0), - CGPoint(x: radius, y: 0)) - .translated(CGPoint(x: -radius, y: radius)) - .translated(CGPoint(x: size.width, y: -size.height)) - .translated(position), - /// Corner 1 - CurveVertex( - CGPoint(x: radius, y: 0), // In tangent - CGPoint(x: radius, y: 0), // Point - CGPoint(x: radius, y: controlPoint)) - .translated(CGPoint(x: -radius, y: -radius)) - .translated(CGPoint(x: size.width, y: size.height)) - .translated(position), - CurveVertex( - CGPoint(x: controlPoint, y: radius), // In tangent - CGPoint(x: 0, y: radius), // Point - CGPoint(x: 0, y: radius)) // Out Tangent - .translated(CGPoint(x: -radius, y: -radius)) - .translated(CGPoint(x: size.width, y: size.height)) - .translated(position), - /// Corner 2 - CurveVertex( - CGPoint(x: 0, y: radius), // In tangent - CGPoint(x: 0, y: radius), // Point - CGPoint(x: -controlPoint, y: radius)) // Out tangent - .translated(CGPoint(x: radius, y: -radius)) - .translated(CGPoint(x: -size.width, y: size.height)) - .translated(position), - CurveVertex( - CGPoint(x: -radius, y: controlPoint), // In tangent - CGPoint(x: -radius, y: 0), // Point - CGPoint(x: -radius, y: 0)) // Out tangent - .translated(CGPoint(x: radius, y: -radius)) - .translated(CGPoint(x: -size.width, y: size.height)) - .translated(position), - /// Corner 3 - CurveVertex( - CGPoint(x: -radius, y: 0), // In tangent - CGPoint(x: -radius, y: 0), // Point - CGPoint(x: -radius, y: -controlPoint)) // Out tangent - .translated(CGPoint(x: radius, y: radius)) - .translated(CGPoint(x: -size.width, y: -size.height)) - .translated(position), - CurveVertex( - CGPoint(x: -controlPoint, y: -radius), // In tangent - CGPoint(x: 0, y: -radius), // Point - CGPoint(x: 0, y: -radius)) // Out tangent - .translated(CGPoint(x: radius, y: radius)) - .translated(CGPoint(x: -size.width, y: -size.height)) - .translated(position), - /// Corner 4 - CurveVertex( - CGPoint(x: 0, y: -radius), // In tangent - CGPoint(x: 0, y: -radius), // Point - CGPoint(x: controlPoint, y: -radius)) // Out tangent - .translated(CGPoint(x: -radius, y: radius)) - .translated(CGPoint(x: size.width, y: -size.height)) - .translated(position), - CurveVertex( - CGPoint(x: radius, y: -controlPoint), // In tangent - CGPoint(x: radius, y: 0), // Point - CGPoint(x: radius, y: 0)) // Out tangent - .translated(CGPoint(x: -radius, y: radius)) - .translated(CGPoint(x: size.width, y: -size.height)) - .translated(position), - ] - } - let reversed = direction == .counterClockwise - let pathPoints = reversed ? points.reversed() : points - for point in pathPoints { - bezierPath.addVertex(reversed ? point.reversed() : point) - } - bezierPath.close() - return bezierPath - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/ShapeNode.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/ShapeNode.swift deleted file mode 100644 index 7bc7d90..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/ShapeNode.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// PathNode.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/16/19. -// - -import CoreGraphics -import Foundation - -// MARK: - ShapeNodeProperties - -final class ShapeNodeProperties: NodePropertyMap, KeypathSearchable { - - // MARK: Lifecycle - - init(shape: Shape) { - keypathName = shape.name - path = NodeProperty(provider: KeyframeInterpolator(keyframes: shape.path.keyframes)) - keypathProperties = [ - "Path" : path, - ] - properties = Array(keypathProperties.values) - } - - // MARK: Internal - - var keypathName: String - - let path: NodeProperty - let keypathProperties: [String: AnyNodeProperty] - let properties: [AnyNodeProperty] - -} - -// MARK: - ShapeNode - -final class ShapeNode: AnimatorNode, PathNode { - - // MARK: Lifecycle - - init(parentNode: AnimatorNode?, shape: Shape) { - pathOutput = PathOutputNode(parent: parentNode?.outputNode) - properties = ShapeNodeProperties(shape: shape) - self.parentNode = parentNode - } - - // MARK: Internal - - let properties: ShapeNodeProperties - - let pathOutput: PathOutputNode - - let parentNode: AnimatorNode? - var hasLocalUpdates = false - var hasUpstreamUpdates = false - var lastUpdateFrame: CGFloat? = nil - - // MARK: Animator Node - var propertyMap: NodePropertyMap & KeypathSearchable { - properties - } - - var isEnabled = true { - didSet { - pathOutput.isEnabled = isEnabled - } - } - - func rebuildOutputs(frame: CGFloat) { - pathOutput.setPath(properties.path.value, updateFrame: frame) - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/StarNode.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/StarNode.swift deleted file mode 100644 index bf17531..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/StarNode.swift +++ /dev/null @@ -1,222 +0,0 @@ -// -// StarNode.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/21/19. -// - -import Foundation -import QuartzCore - -// MARK: - StarNodeProperties - -final class StarNodeProperties: NodePropertyMap, KeypathSearchable { - - // MARK: Lifecycle - - init(star: Star) { - keypathName = star.name - direction = star.direction - position = NodeProperty(provider: KeyframeInterpolator(keyframes: star.position.keyframes)) - outerRadius = NodeProperty(provider: KeyframeInterpolator(keyframes: star.outerRadius.keyframes)) - outerRoundedness = NodeProperty(provider: KeyframeInterpolator(keyframes: star.outerRoundness.keyframes)) - if let innerRadiusKeyframes = star.innerRadius?.keyframes { - innerRadius = NodeProperty(provider: KeyframeInterpolator(keyframes: innerRadiusKeyframes)) - } else { - innerRadius = NodeProperty(provider: SingleValueProvider(LottieVector1D(0))) - } - if let innderRoundedness = star.innerRoundness?.keyframes { - innerRoundedness = NodeProperty(provider: KeyframeInterpolator(keyframes: innderRoundedness)) - } else { - innerRoundedness = NodeProperty(provider: SingleValueProvider(LottieVector1D(0))) - } - rotation = NodeProperty(provider: KeyframeInterpolator(keyframes: star.rotation.keyframes)) - points = NodeProperty(provider: KeyframeInterpolator(keyframes: star.points.keyframes)) - keypathProperties = [ - PropertyName.position.rawValue : position, - "Outer Radius" : outerRadius, - "Outer Roundedness" : outerRoundedness, - "Inner Radius" : innerRadius, - "Inner Roundedness" : innerRoundedness, - PropertyName.rotation.rawValue : rotation, - "Points" : points, - ] - properties = Array(keypathProperties.values) - } - - // MARK: Internal - - var keypathName: String - - let keypathProperties: [String: AnyNodeProperty] - let properties: [AnyNodeProperty] - - let direction: PathDirection - let position: NodeProperty - let outerRadius: NodeProperty - let outerRoundedness: NodeProperty - let innerRadius: NodeProperty - let innerRoundedness: NodeProperty - let rotation: NodeProperty - let points: NodeProperty -} - -// MARK: - StarNode - -final class StarNode: AnimatorNode, PathNode { - - // MARK: Lifecycle - - init(parentNode: AnimatorNode?, star: Star) { - pathOutput = PathOutputNode(parent: parentNode?.outputNode) - properties = StarNodeProperties(star: star) - self.parentNode = parentNode - } - - // MARK: Internal - - /// Magic number needed for building path data - static let PolystarConstant: CGFloat = 0.47829 - - let properties: StarNodeProperties - - let pathOutput: PathOutputNode - - let parentNode: AnimatorNode? - var hasLocalUpdates = false - var hasUpstreamUpdates = false - var lastUpdateFrame: CGFloat? = nil - - // MARK: Animator Node - var propertyMap: NodePropertyMap & KeypathSearchable { - properties - } - - var isEnabled = true { - didSet { - pathOutput.isEnabled = isEnabled - } - } - - func rebuildOutputs(frame: CGFloat) { - let path = BezierPath.star( - position: properties.position.value.pointValue, - outerRadius: properties.outerRadius.value.cgFloatValue, - innerRadius: properties.innerRadius.value.cgFloatValue, - outerRoundedness: properties.outerRoundedness.value.cgFloatValue, - innerRoundedness: properties.innerRoundedness.value.cgFloatValue, - numberOfPoints: properties.points.value.cgFloatValue, - rotation: properties.rotation.value.cgFloatValue, - direction: properties.direction) - - pathOutput.setPath(path, updateFrame: frame) - } - -} - -extension BezierPath { - /// Constructs a `BezierPath` in the shape of a star - static func star( - position: CGPoint, - outerRadius: CGFloat, - innerRadius: CGFloat, - outerRoundedness inoutOuterRoundedness: CGFloat, - innerRoundedness inputInnerRoundedness: CGFloat, - numberOfPoints: CGFloat, - rotation: CGFloat, - direction: PathDirection) - -> BezierPath - { - var currentAngle = (rotation - 90).toRadians() - let anglePerPoint = (2 * CGFloat.pi) / numberOfPoints - let halfAnglePerPoint = anglePerPoint / 2.0 - let partialPointAmount = numberOfPoints - floor(numberOfPoints) - let outerRoundedness = inoutOuterRoundedness * 0.01 - let innerRoundedness = inputInnerRoundedness * 0.01 - - var point: CGPoint = .zero - - var partialPointRadius: CGFloat = 0 - if partialPointAmount != 0 { - currentAngle += halfAnglePerPoint * (1 - partialPointAmount) - partialPointRadius = innerRadius + partialPointAmount * (outerRadius - innerRadius) - point.x = (partialPointRadius * cos(currentAngle)) - point.y = (partialPointRadius * sin(currentAngle)) - currentAngle += anglePerPoint * partialPointAmount / 2 - } else { - point.x = (outerRadius * cos(currentAngle)) - point.y = (outerRadius * sin(currentAngle)) - currentAngle += halfAnglePerPoint - } - - var vertices = [CurveVertex]() - vertices.append(CurveVertex(point: point + position, inTangentRelative: .zero, outTangentRelative: .zero)) - - var previousPoint = point - var longSegment = false - let numPoints = Int(ceil(numberOfPoints) * 2) - for i in 0.. - let position: NodeProperty - let scale: NodeProperty - let rotationX: NodeProperty - let rotationY: NodeProperty - let rotationZ: NodeProperty - - let opacity: NodeProperty - let skew: NodeProperty - let skewAxis: NodeProperty - - var caTransform: CATransform3D { - CATransform3D.makeTransform( - anchor: anchor.value.pointValue, - position: position.value.pointValue, - scale: scale.value.sizeValue, - rotationX: rotationX.value.cgFloatValue, - rotationY: rotationY.value.cgFloatValue, - rotationZ: rotationZ.value.cgFloatValue, - skew: skew.value.cgFloatValue, - skewAxis: skewAxis.value.cgFloatValue) - } -} - -// MARK: - GroupNode - -final class GroupNode: AnimatorNode { - - // MARK: Lifecycle - - // MARK: Initializer - init(name: String, parentNode: AnimatorNode?, tree: NodeTree) { - self.parentNode = parentNode - keypathName = name - rootNode = tree.rootNode - properties = GroupNodeProperties(transform: tree.transform) - groupOutput = GroupOutputNode(parent: parentNode?.outputNode, rootNode: rootNode?.outputNode) - var childKeypaths: [KeypathSearchable] = tree.childrenNodes - childKeypaths.append(properties) - self.childKeypaths = childKeypaths - - for childContainer in tree.renderContainers { - container.insertRenderLayer(childContainer) - } - } - - // MARK: Internal - - // MARK: Properties - let groupOutput: GroupOutputNode - - let properties: GroupNodeProperties - - let rootNode: AnimatorNode? - - var container = ShapeContainerLayer() - - // MARK: Keypath Searchable - - let keypathName: String - - let childKeypaths: [KeypathSearchable] - - let parentNode: AnimatorNode? - var hasLocalUpdates = false - var hasUpstreamUpdates = false - var lastUpdateFrame: CGFloat? = nil - - var keypathLayer: CALayer? { - container - } - - // MARK: Animator Node Protocol - - var propertyMap: NodePropertyMap & KeypathSearchable { - properties - } - - var outputNode: NodeOutput { - groupOutput - } - - var isEnabled = true { - didSet { - container.isHidden = !isEnabled - } - } - - func performAdditionalLocalUpdates(frame: CGFloat, forceLocalUpdate: Bool) -> Bool { - rootNode?.updateContents(frame, forceLocalUpdate: forceLocalUpdate) ?? false - } - - func performAdditionalOutputUpdates(_ frame: CGFloat, forceOutputUpdate: Bool) { - rootNode?.updateOutputs(frame, forceOutputUpdate: forceOutputUpdate) - } - - func rebuildOutputs(frame: CGFloat) { - container.opacity = Float(properties.opacity.value.cgFloatValue) * 0.01 - container.transform = properties.caTransform - groupOutput.setTransform(container.transform, forFrame: frame) - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/FillNode.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/FillNode.swift deleted file mode 100644 index 1b079b0..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/FillNode.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// FillNode.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/17/19. -// - -import CoreGraphics -import Foundation - -// MARK: - FillNodeProperties - -final class FillNodeProperties: NodePropertyMap, KeypathSearchable { - - // MARK: Lifecycle - - init(fill: Fill) { - keypathName = fill.name - color = NodeProperty(provider: KeyframeInterpolator(keyframes: fill.color.keyframes)) - opacity = NodeProperty(provider: KeyframeInterpolator(keyframes: fill.opacity.keyframes)) - type = fill.fillRule - keypathProperties = [ - PropertyName.opacity.rawValue : opacity, - PropertyName.color.rawValue : color, - ] - properties = Array(keypathProperties.values) - } - - // MARK: Internal - - var keypathName: String - - let opacity: NodeProperty - let color: NodeProperty - let type: FillRule - - let keypathProperties: [String: AnyNodeProperty] - let properties: [AnyNodeProperty] - -} - -// MARK: - FillNode - -final class FillNode: AnimatorNode, RenderNode { - - // MARK: Lifecycle - - init(parentNode: AnimatorNode?, fill: Fill) { - fillRender = FillRenderer(parent: parentNode?.outputNode) - fillProperties = FillNodeProperties(fill: fill) - self.parentNode = parentNode - } - - // MARK: Internal - - let fillRender: FillRenderer - - let fillProperties: FillNodeProperties - - let parentNode: AnimatorNode? - var hasLocalUpdates = false - var hasUpstreamUpdates = false - var lastUpdateFrame: CGFloat? = nil - - var renderer: NodeOutput & Renderable { - fillRender - } - - // MARK: Animator Node Protocol - - var propertyMap: NodePropertyMap & KeypathSearchable { - fillProperties - } - - var isEnabled = true { - didSet { - fillRender.isEnabled = isEnabled - } - } - - func localUpdatesPermeateDownstream() -> Bool { - false - } - - func rebuildOutputs(frame _: CGFloat) { - fillRender.color = fillProperties.color.value.cgColorValue - fillRender.opacity = fillProperties.opacity.value.cgFloatValue * 0.01 - fillRender.fillRule = fillProperties.type - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientFillNode.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientFillNode.swift deleted file mode 100644 index f227d1e..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientFillNode.swift +++ /dev/null @@ -1,105 +0,0 @@ -// -// GradientFillNode.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/22/19. -// - -import Foundation -import QuartzCore - -// MARK: - GradientFillProperties - -final class GradientFillProperties: NodePropertyMap, KeypathSearchable { - - // MARK: Lifecycle - - init(gradientfill: GradientFill) { - keypathName = gradientfill.name - opacity = NodeProperty(provider: KeyframeInterpolator(keyframes: gradientfill.opacity.keyframes)) - startPoint = NodeProperty(provider: KeyframeInterpolator(keyframes: gradientfill.startPoint.keyframes)) - endPoint = NodeProperty(provider: KeyframeInterpolator(keyframes: gradientfill.endPoint.keyframes)) - colors = NodeProperty(provider: KeyframeInterpolator(keyframes: gradientfill.colors.keyframes)) - gradientType = gradientfill.gradientType - numberOfColors = gradientfill.numberOfColors - fillRule = gradientfill.fillRule - keypathProperties = [ - PropertyName.opacity.rawValue : opacity, - "Start Point" : startPoint, - "End Point" : endPoint, - "Colors" : colors, - ] - properties = Array(keypathProperties.values) - } - - // MARK: Internal - - var keypathName: String - - let opacity: NodeProperty - let startPoint: NodeProperty - let endPoint: NodeProperty - let colors: NodeProperty<[Double]> - - let gradientType: GradientType - let numberOfColors: Int - let fillRule: FillRule - - let keypathProperties: [String: AnyNodeProperty] - let properties: [AnyNodeProperty] - -} - -// MARK: - GradientFillNode - -final class GradientFillNode: AnimatorNode, RenderNode { - - // MARK: Lifecycle - - init(parentNode: AnimatorNode?, gradientFill: GradientFill) { - fillRender = GradientFillRenderer(parent: parentNode?.outputNode) - fillProperties = GradientFillProperties(gradientfill: gradientFill) - self.parentNode = parentNode - } - - // MARK: Internal - - let fillRender: GradientFillRenderer - - let fillProperties: GradientFillProperties - - let parentNode: AnimatorNode? - var hasLocalUpdates = false - var hasUpstreamUpdates = false - var lastUpdateFrame: CGFloat? = nil - - var renderer: NodeOutput & Renderable { - fillRender - } - - // MARK: Animator Node Protocol - - var propertyMap: NodePropertyMap & KeypathSearchable { - fillProperties - } - - var isEnabled = true { - didSet { - fillRender.isEnabled = isEnabled - } - } - - func localUpdatesPermeateDownstream() -> Bool { - false - } - - func rebuildOutputs(frame _: CGFloat) { - fillRender.start = fillProperties.startPoint.value.pointValue - fillRender.end = fillProperties.endPoint.value.pointValue - fillRender.opacity = fillProperties.opacity.value.cgFloatValue * 0.01 - fillRender.colors = fillProperties.colors.value.map { CGFloat($0) } - fillRender.type = fillProperties.gradientType - fillRender.numberOfColors = fillProperties.numberOfColors - fillRender.fillRule = fillProperties.fillRule.caFillRule - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientStrokeNode.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientStrokeNode.swift deleted file mode 100644 index 3b02dc2..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientStrokeNode.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// GradientStrokeNode.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/23/19. -// - -import CoreGraphics -import Foundation - -// MARK: - GradientStrokeProperties - -final class GradientStrokeProperties: NodePropertyMap, KeypathSearchable { - - // MARK: Lifecycle - - init(gradientStroke: GradientStroke) { - keypathName = gradientStroke.name - opacity = NodeProperty(provider: KeyframeInterpolator(keyframes: gradientStroke.opacity.keyframes)) - startPoint = NodeProperty(provider: KeyframeInterpolator(keyframes: gradientStroke.startPoint.keyframes)) - endPoint = NodeProperty(provider: KeyframeInterpolator(keyframes: gradientStroke.endPoint.keyframes)) - colors = NodeProperty(provider: KeyframeInterpolator(keyframes: gradientStroke.colors.keyframes)) - gradientType = gradientStroke.gradientType - numberOfColors = gradientStroke.numberOfColors - width = NodeProperty(provider: KeyframeInterpolator(keyframes: gradientStroke.width.keyframes)) - miterLimit = CGFloat(gradientStroke.miterLimit) - lineCap = gradientStroke.lineCap - lineJoin = gradientStroke.lineJoin - - if let dashes = gradientStroke.dashPattern { - var dashPatterns = ContiguousArray>>() - var dashPhase = ContiguousArray>() - for dash in dashes { - if dash.type == .offset { - dashPhase = dash.value.keyframes - } else { - dashPatterns.append(dash.value.keyframes) - } - } - dashPattern = NodeProperty(provider: GroupInterpolator(keyframeGroups: dashPatterns)) - self.dashPhase = NodeProperty(provider: KeyframeInterpolator(keyframes: dashPhase)) - } else { - dashPattern = NodeProperty(provider: SingleValueProvider([LottieVector1D]())) - dashPhase = NodeProperty(provider: SingleValueProvider(LottieVector1D(0))) - } - keypathProperties = [ - PropertyName.opacity.rawValue : opacity, - "Start Point" : startPoint, - "End Point" : endPoint, - "Colors" : colors, - "Stroke Width" : width, - "Dashes" : dashPattern, - "Dash Phase" : dashPhase, - ] - properties = Array(keypathProperties.values) - } - - // MARK: Internal - - var keypathName: String - - let opacity: NodeProperty - let startPoint: NodeProperty - let endPoint: NodeProperty - let colors: NodeProperty<[Double]> - let width: NodeProperty - - let dashPattern: NodeProperty<[LottieVector1D]> - let dashPhase: NodeProperty - - let lineCap: LineCap - let lineJoin: LineJoin - let miterLimit: CGFloat - let gradientType: GradientType - let numberOfColors: Int - - let keypathProperties: [String: AnyNodeProperty] - let properties: [AnyNodeProperty] - -} - -// MARK: - GradientStrokeNode - -final class GradientStrokeNode: AnimatorNode, RenderNode { - - // MARK: Lifecycle - - init(parentNode: AnimatorNode?, gradientStroke: GradientStroke) { - strokeRender = GradientStrokeRenderer(parent: parentNode?.outputNode) - strokeProperties = GradientStrokeProperties(gradientStroke: gradientStroke) - self.parentNode = parentNode - } - - // MARK: Internal - - let strokeRender: GradientStrokeRenderer - - let strokeProperties: GradientStrokeProperties - - let parentNode: AnimatorNode? - var hasLocalUpdates = false - var hasUpstreamUpdates = false - var lastUpdateFrame: CGFloat? = nil - - var renderer: NodeOutput & Renderable { - strokeRender - } - - // MARK: Animator Node Protocol - - var propertyMap: NodePropertyMap & KeypathSearchable { - strokeProperties - } - - var isEnabled = true { - didSet { - strokeRender.isEnabled = isEnabled - } - } - - func localUpdatesPermeateDownstream() -> Bool { - false - } - - func rebuildOutputs(frame _: CGFloat) { - /// Update gradient properties - strokeRender.gradientRender.start = strokeProperties.startPoint.value.pointValue - strokeRender.gradientRender.end = strokeProperties.endPoint.value.pointValue - strokeRender.gradientRender.opacity = strokeProperties.opacity.value.cgFloatValue - strokeRender.gradientRender.colors = strokeProperties.colors.value.map { CGFloat($0) } - strokeRender.gradientRender.type = strokeProperties.gradientType - strokeRender.gradientRender.numberOfColors = strokeProperties.numberOfColors - - /// Now update stroke properties - strokeRender.strokeRender.opacity = strokeProperties.opacity.value.cgFloatValue - strokeRender.strokeRender.width = strokeProperties.width.value.cgFloatValue - strokeRender.strokeRender.miterLimit = strokeProperties.miterLimit - strokeRender.strokeRender.lineCap = strokeProperties.lineCap - strokeRender.strokeRender.lineJoin = strokeProperties.lineJoin - - /// Get dash lengths - let dashLengths = strokeProperties.dashPattern.value.map { $0.cgFloatValue } - if dashLengths.count > 0, dashLengths.isSupportedLayerDashPattern { - strokeRender.strokeRender.dashPhase = strokeProperties.dashPhase.value.cgFloatValue - strokeRender.strokeRender.dashLengths = dashLengths - } else { - strokeRender.strokeRender.dashLengths = nil - strokeRender.strokeRender.dashPhase = nil - } - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/StrokeNode.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/StrokeNode.swift deleted file mode 100644 index bc61fcb..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/StrokeNode.swift +++ /dev/null @@ -1,180 +0,0 @@ -// -// StrokeNode.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/22/19. -// - -import Foundation -import QuartzCore - -// MARK: - StrokeNodeProperties - -final class StrokeNodeProperties: NodePropertyMap, KeypathSearchable { - - // MARK: Lifecycle - - init(stroke: Stroke) { - keypathName = stroke.name - color = NodeProperty(provider: KeyframeInterpolator(keyframes: stroke.color.keyframes)) - opacity = NodeProperty(provider: KeyframeInterpolator(keyframes: stroke.opacity.keyframes)) - width = NodeProperty(provider: KeyframeInterpolator(keyframes: stroke.width.keyframes)) - miterLimit = CGFloat(stroke.miterLimit) - lineCap = stroke.lineCap - lineJoin = stroke.lineJoin - - if let dashes = stroke.dashPattern { - let (dashPatterns, dashPhase) = dashes.shapeLayerConfiguration - dashPattern = NodeProperty(provider: GroupInterpolator(keyframeGroups: dashPatterns)) - if dashPhase.count == 0 { - self.dashPhase = NodeProperty(provider: SingleValueProvider(LottieVector1D(0))) - } else { - self.dashPhase = NodeProperty(provider: KeyframeInterpolator(keyframes: dashPhase)) - } - } else { - dashPattern = NodeProperty(provider: SingleValueProvider([LottieVector1D]())) - dashPhase = NodeProperty(provider: SingleValueProvider(LottieVector1D(0))) - } - keypathProperties = [ - PropertyName.opacity.rawValue : opacity, - PropertyName.color.rawValue : color, - "Stroke Width" : width, - "Dashes" : dashPattern, - "Dash Phase" : dashPhase, - ] - properties = Array(keypathProperties.values) - } - - // MARK: Internal - - let keypathName: String - let keypathProperties: [String: AnyNodeProperty] - let properties: [AnyNodeProperty] - - let opacity: NodeProperty - let color: NodeProperty - let width: NodeProperty - - let dashPattern: NodeProperty<[LottieVector1D]> - let dashPhase: NodeProperty - - let lineCap: LineCap - let lineJoin: LineJoin - let miterLimit: CGFloat - -} - -// MARK: - StrokeNode - -/// Node that manages stroking a path -final class StrokeNode: AnimatorNode, RenderNode { - - // MARK: Lifecycle - - init(parentNode: AnimatorNode?, stroke: Stroke) { - strokeRender = StrokeRenderer(parent: parentNode?.outputNode) - strokeProperties = StrokeNodeProperties(stroke: stroke) - self.parentNode = parentNode - } - - // MARK: Internal - - let strokeRender: StrokeRenderer - - let strokeProperties: StrokeNodeProperties - - let parentNode: AnimatorNode? - var hasLocalUpdates = false - var hasUpstreamUpdates = false - var lastUpdateFrame: CGFloat? = nil - - var renderer: NodeOutput & Renderable { - strokeRender - } - - // MARK: Animator Node Protocol - - var propertyMap: NodePropertyMap & KeypathSearchable { - strokeProperties - } - - var isEnabled = true { - didSet { - strokeRender.isEnabled = isEnabled - } - } - - func localUpdatesPermeateDownstream() -> Bool { - false - } - - func rebuildOutputs(frame _: CGFloat) { - strokeRender.color = strokeProperties.color.value.cgColorValue - strokeRender.opacity = strokeProperties.opacity.value.cgFloatValue * 0.01 - strokeRender.width = strokeProperties.width.value.cgFloatValue - strokeRender.miterLimit = strokeProperties.miterLimit - strokeRender.lineCap = strokeProperties.lineCap - strokeRender.lineJoin = strokeProperties.lineJoin - - /// Get dash lengths - let dashLengths = strokeProperties.dashPattern.value.map { $0.cgFloatValue } - if dashLengths.count > 0, dashLengths.isSupportedLayerDashPattern { - strokeRender.dashPhase = strokeProperties.dashPhase.value.cgFloatValue - strokeRender.dashLengths = dashLengths - } else { - strokeRender.dashLengths = nil - strokeRender.dashPhase = nil - } - } - -} - -// MARK: - [DashElement] + shapeLayerConfiguration - -extension Array where Element == DashElement { - typealias ShapeLayerConfiguration = ( - dashPatterns: ContiguousArray>>, - dashPhase: ContiguousArray>) - - /// Converts the `[DashElement]` data model into `lineDashPattern` and `lineDashPhase` - /// representations usable in a `CAShapeLayer` - var shapeLayerConfiguration: ShapeLayerConfiguration { - var dashPatterns = ContiguousArray>>() - var dashPhase = ContiguousArray>() - for dash in self { - if dash.type == .offset { - dashPhase = dash.value.keyframes - } else { - dashPatterns.append(dash.value.keyframes) - } - } - - dashPatterns = ContiguousArray(dashPatterns.map { pattern in - ContiguousArray(pattern.map { keyframe -> Keyframe in - // The recommended way to create a stroke of round dots, in theory, - // is to use a value of 0 followed by the stroke width, but for - // some reason Core Animation incorrectly (?) renders these as pills - // instead of circles. As a workaround, for parity with Lottie on other - // platforms, we can change `0`s to `0.01`: https://stackoverflow.com/a/38036486 - if keyframe.value.cgFloatValue == 0 { - return keyframe.withValue(LottieVector1D(0.01)) - } else { - return keyframe - } - }) - }) - - return (dashPatterns, dashPhase) - } -} - -extension Array where Element == CGFloat { - // If all of the items in the dash pattern are zeros, then we shouldn't attempt to render it. - // This causes Core Animation to have extremely poor performance for some reason, even though - // it doesn't affect the appearance of the animation. - // - We check for `== 0.01` instead of `== 0` because `dashPattern.shapeLayerConfiguration` - // converts all `0` values to `0.01` to work around a different Core Animation rendering issue. - var isSupportedLayerDashPattern: Bool { - !allSatisfy { $0 == 0.01 } - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/Text/TextAnimatorNode.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/Text/TextAnimatorNode.swift deleted file mode 100644 index 467b70f..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Nodes/Text/TextAnimatorNode.swift +++ /dev/null @@ -1,289 +0,0 @@ -// -// TextAnimatorNode.swift -// lottie-ios-iOS -// -// Created by Brandon Withrow on 2/19/19. -// - -import CoreGraphics -import Foundation -import QuartzCore - -// MARK: - TextAnimatorNodeProperties - -final class TextAnimatorNodeProperties: NodePropertyMap, KeypathSearchable { - - // MARK: Lifecycle - - init(textAnimator: TextAnimator) { - keypathName = textAnimator.name - var properties = [String : AnyNodeProperty]() - - if let keyframeGroup = textAnimator.anchor { - anchor = NodeProperty(provider: KeyframeInterpolator(keyframes: keyframeGroup.keyframes)) - properties["Anchor"] = anchor - } else { - anchor = nil - } - - if let keyframeGroup = textAnimator.position { - position = NodeProperty(provider: KeyframeInterpolator(keyframes: keyframeGroup.keyframes)) - properties[PropertyName.position.rawValue] = position - } else { - position = nil - } - - if let keyframeGroup = textAnimator.scale { - scale = NodeProperty(provider: KeyframeInterpolator(keyframes: keyframeGroup.keyframes)) - properties[PropertyName.scale.rawValue] = scale - } else { - scale = nil - } - - if let keyframeGroup = textAnimator.skew { - skew = NodeProperty(provider: KeyframeInterpolator(keyframes: keyframeGroup.keyframes)) - properties["Skew"] = skew - } else { - skew = nil - } - - if let keyframeGroup = textAnimator.skewAxis { - skewAxis = NodeProperty(provider: KeyframeInterpolator(keyframes: keyframeGroup.keyframes)) - properties["Skew Axis"] = skewAxis - } else { - skewAxis = nil - } - - if let keyframeGroup = textAnimator.rotationX { - rotationX = NodeProperty(provider: KeyframeInterpolator(keyframes: keyframeGroup.keyframes)) - properties["Rotation X"] = rotationX - } else { - rotationX = nil - } - - if let keyframeGroup = textAnimator.rotationY { - rotationY = NodeProperty(provider: KeyframeInterpolator(keyframes: keyframeGroup.keyframes)) - properties["Rotation Y"] = rotationY - } else { - rotationY = nil - } - - if let keyframeGroup = textAnimator.rotationZ { - rotationZ = NodeProperty(provider: KeyframeInterpolator(keyframes: keyframeGroup.keyframes)) - properties["Rotation Z"] = rotationZ - properties[PropertyName.rotation.rawValue] = rotationZ - } else { - rotationZ = nil - } - - if let keyframeGroup = textAnimator.opacity { - opacity = NodeProperty(provider: KeyframeInterpolator(keyframes: keyframeGroup.keyframes)) - properties[PropertyName.opacity.rawValue] = opacity - } else { - opacity = nil - } - - if let keyframeGroup = textAnimator.strokeColor { - strokeColor = NodeProperty(provider: KeyframeInterpolator(keyframes: keyframeGroup.keyframes)) - properties["Stroke Color"] = strokeColor - } else { - strokeColor = nil - } - - if let keyframeGroup = textAnimator.fillColor { - fillColor = NodeProperty(provider: KeyframeInterpolator(keyframes: keyframeGroup.keyframes)) - properties["Fill Color"] = fillColor - } else { - fillColor = nil - } - - if let keyframeGroup = textAnimator.strokeWidth { - strokeWidth = NodeProperty(provider: KeyframeInterpolator(keyframes: keyframeGroup.keyframes)) - properties["Stroke Width"] = strokeWidth - } else { - strokeWidth = nil - } - - if let keyframeGroup = textAnimator.tracking { - tracking = NodeProperty(provider: KeyframeInterpolator(keyframes: keyframeGroup.keyframes)) - properties["Tracking"] = tracking - } else { - tracking = nil - } - - keypathProperties = properties - - self.properties = Array(keypathProperties.values) - } - - // MARK: Internal - - let keypathName: String - - let anchor: NodeProperty? - let position: NodeProperty? - let scale: NodeProperty? - let skew: NodeProperty? - let skewAxis: NodeProperty? - let rotationX: NodeProperty? - let rotationY: NodeProperty? - let rotationZ: NodeProperty? - let opacity: NodeProperty? - let strokeColor: NodeProperty? - let fillColor: NodeProperty? - let strokeWidth: NodeProperty? - let tracking: NodeProperty? - - let keypathProperties: [String: AnyNodeProperty] - let properties: [AnyNodeProperty] - - var caTransform: CATransform3D { - CATransform3D.makeTransform( - anchor: anchor?.value.pointValue ?? .zero, - position: position?.value.pointValue ?? .zero, - scale: scale?.value.sizeValue ?? CGSize(width: 100, height: 100), - rotationX: rotationX?.value.cgFloatValue ?? 0, - rotationY: rotationY?.value.cgFloatValue ?? 0, - rotationZ: rotationZ?.value.cgFloatValue ?? 0, - skew: skew?.value.cgFloatValue, - skewAxis: skewAxis?.value.cgFloatValue) - } -} - -// MARK: - TextOutputNode - -final class TextOutputNode: NodeOutput { - - // MARK: Lifecycle - - init(parent: TextOutputNode?) { - parentTextNode = parent - } - - // MARK: Internal - - var parentTextNode: TextOutputNode? - var isEnabled = true - - var outputPath: CGPath? - - var parent: NodeOutput? { - parentTextNode - } - - var xform: CATransform3D { - get { - _xform ?? parentTextNode?.xform ?? CATransform3DIdentity - } - set { - _xform = newValue - } - } - - var opacity: CGFloat { - get { - _opacity ?? parentTextNode?.opacity ?? 1 - } - set { - _opacity = newValue - } - } - - var strokeColor: CGColor? { - get { - _strokeColor ?? parentTextNode?.strokeColor - } - set { - _strokeColor = newValue - } - } - - var fillColor: CGColor? { - get { - _fillColor ?? parentTextNode?.fillColor - } - set { - _fillColor = newValue - } - } - - var tracking: CGFloat { - get { - _tracking ?? parentTextNode?.tracking ?? 0 - } - set { - _tracking = newValue - } - } - - var strokeWidth: CGFloat { - get { - _strokeWidth ?? parentTextNode?.strokeWidth ?? 0 - } - set { - _strokeWidth = newValue - } - } - - func hasOutputUpdates(_: CGFloat) -> Bool { - // TODO Fix This - true - } - - // MARK: Fileprivate - - fileprivate var _xform: CATransform3D? - fileprivate var _opacity: CGFloat? - fileprivate var _strokeColor: CGColor? - fileprivate var _fillColor: CGColor? - fileprivate var _tracking: CGFloat? - fileprivate var _strokeWidth: CGFloat? -} - -// MARK: - TextAnimatorNode - -class TextAnimatorNode: AnimatorNode { - - // MARK: Lifecycle - - init(parentNode: TextAnimatorNode?, textAnimator: TextAnimator) { - textOutputNode = TextOutputNode(parent: parentNode?.textOutputNode) - textAnimatorProperties = TextAnimatorNodeProperties(textAnimator: textAnimator) - self.parentNode = parentNode - } - - // MARK: Internal - - let textOutputNode: TextOutputNode - - let textAnimatorProperties: TextAnimatorNodeProperties - - let parentNode: AnimatorNode? - var hasLocalUpdates = false - var hasUpstreamUpdates = false - var lastUpdateFrame: CGFloat? = nil - var isEnabled = true - - var outputNode: NodeOutput { - textOutputNode - } - - // MARK: Animator Node Protocol - - var propertyMap: NodePropertyMap & KeypathSearchable { - textAnimatorProperties - } - - func localUpdatesPermeateDownstream() -> Bool { - true - } - - func rebuildOutputs(frame _: CGFloat) { - textOutputNode.xform = textAnimatorProperties.caTransform - textOutputNode.opacity = (textAnimatorProperties.opacity?.value.cgFloatValue ?? 100) * 0.01 - textOutputNode.strokeColor = textAnimatorProperties.strokeColor?.value.cgColorValue - textOutputNode.fillColor = textAnimatorProperties.fillColor?.value.cgColorValue - textOutputNode.tracking = textAnimatorProperties.tracking?.value.cgFloatValue ?? 1 - textOutputNode.strokeWidth = textAnimatorProperties.strokeWidth?.value.cgFloatValue ?? 0 - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Protocols/AnimatorNode.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Protocols/AnimatorNode.swift deleted file mode 100644 index 1327618..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Protocols/AnimatorNode.swift +++ /dev/null @@ -1,198 +0,0 @@ -// -// AnimatorNode.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/15/19. -// - -import Foundation -import QuartzCore - -// MARK: - NodeOutput - -/// Defines the basic outputs of an animator node. -/// -protocol NodeOutput { - - /// The parent node. - var parent: NodeOutput? { get } - - /// Returns true if there are any updates upstream. OutputPath must be built before returning. - func hasOutputUpdates(_ forFrame: CGFloat) -> Bool - - var outputPath: CGPath? { get } - - var isEnabled: Bool { get set } -} - -// MARK: - AnimatorNode - -/// The Animator Node is the base node in the render system tree. -/// -/// It defines a single node that has an output path and option input node. -/// At animation time the root animation node is asked to update its contents for -/// the current frame. -/// The node reaches up its chain of nodes until the first node that does not need -/// updating is found. Then each node updates its contents down the render pipeline. -/// Each node adds its local path to its input path and passes it forward. -/// -/// An animator node holds a group of interpolators. These interpolators determine -/// if the node needs an update for the current frame. -/// -protocol AnimatorNode: AnyObject, KeypathSearchable { - - /// The available properties of the Node. - /// - /// These properties are automatically updated each frame. - /// These properties are also settable and gettable through the dynamic - /// property system. - /// - var propertyMap: NodePropertyMap & KeypathSearchable { get } - - /// The upstream input node - var parentNode: AnimatorNode? { get } - - /// The output of the node. - var outputNode: NodeOutput { get } - - /// Update the outputs of the node. Called if local contents were update or if outputsNeedUpdate returns true. - func rebuildOutputs(frame: CGFloat) - - /// Setters for marking current node state. - var isEnabled: Bool { get set } - var hasLocalUpdates: Bool { get set } - var hasUpstreamUpdates: Bool { get set } - var lastUpdateFrame: CGFloat? { get set } - - // MARK: Optional - - /// Marks if updates to this node affect nodes downstream. - func localUpdatesPermeateDownstream() -> Bool - func forceUpstreamOutputUpdates() -> Bool - - /// Called at the end of this nodes update cycle. Always called. Optional. - func performAdditionalLocalUpdates(frame: CGFloat, forceLocalUpdate: Bool) -> Bool - func performAdditionalOutputUpdates(_ frame: CGFloat, forceOutputUpdate: Bool) - - /// The default simply returns `hasLocalUpdates` - func shouldRebuildOutputs(frame: CGFloat) -> Bool -} - -/// Basic Node Logic -extension AnimatorNode { - - func shouldRebuildOutputs(frame _: CGFloat) -> Bool { - hasLocalUpdates - } - - func localUpdatesPermeateDownstream() -> Bool { - /// Optional override - true - } - - func forceUpstreamOutputUpdates() -> Bool { - /// Optional - false - } - - func performAdditionalLocalUpdates(frame _: CGFloat, forceLocalUpdate: Bool) -> Bool { - /// Optional - forceLocalUpdate - } - - func performAdditionalOutputUpdates(_: CGFloat, forceOutputUpdate _: Bool) { - /// Optional - } - - @discardableResult - func updateOutputs(_ frame: CGFloat, forceOutputUpdate: Bool) -> Bool { - guard isEnabled else { - // Disabled node, pass through. - lastUpdateFrame = frame - return parentNode?.updateOutputs(frame, forceOutputUpdate: forceOutputUpdate) ?? false - } - - if forceOutputUpdate == false && lastUpdateFrame != nil && lastUpdateFrame! == frame { - /// This node has already updated for this frame. Go ahead and return the results. - return hasUpstreamUpdates || hasLocalUpdates - } - - /// Ask if this node should force output updates upstream. - let forceUpstreamUpdates = forceOutputUpdate || forceUpstreamOutputUpdates() - - /// Perform upstream output updates. Optionally mark upstream updates if any. - hasUpstreamUpdates = ( - parentNode? - .updateOutputs(frame, forceOutputUpdate: forceUpstreamUpdates) ?? false || hasUpstreamUpdates) - - /// Perform additional local output updates - performAdditionalOutputUpdates(frame, forceOutputUpdate: forceUpstreamUpdates) - - /// If there are local updates, or if updates have been force, rebuild outputs - if forceUpstreamUpdates || shouldRebuildOutputs(frame: frame) { - lastUpdateFrame = frame - rebuildOutputs(frame: frame) - } - return hasUpstreamUpdates || hasLocalUpdates - } - - /// Rebuilds the content of this node, and upstream nodes if necessary. - @discardableResult - func updateContents(_ frame: CGFloat, forceLocalUpdate: Bool) -> Bool { - guard isEnabled else { - // Disabled node, pass through. - return parentNode?.updateContents(frame, forceLocalUpdate: forceLocalUpdate) ?? false - } - - if forceLocalUpdate == false && lastUpdateFrame != nil && lastUpdateFrame! == frame { - /// This node has already updated for this frame. Go ahead and return the results. - return localUpdatesPermeateDownstream() ? hasUpstreamUpdates || hasLocalUpdates : hasUpstreamUpdates - } - - /// Are there local updates? If so mark the node. - hasLocalUpdates = forceLocalUpdate ? forceLocalUpdate : propertyMap.needsLocalUpdate(frame: frame) - - /// Were there upstream updates? If so mark the node - hasUpstreamUpdates = parentNode?.updateContents(frame, forceLocalUpdate: forceLocalUpdate) ?? false - - /// Perform property updates if necessary. - if hasLocalUpdates { - /// Rebuild local properties - propertyMap.updateNodeProperties(frame: frame) - } - - /// Ask the node to perform any other updates it might have. - hasUpstreamUpdates = performAdditionalLocalUpdates(frame: frame, forceLocalUpdate: forceLocalUpdate) || hasUpstreamUpdates - - /// If the node can update nodes downstream, notify them, otherwise pass on any upstream updates downstream. - return localUpdatesPermeateDownstream() ? hasUpstreamUpdates || hasLocalUpdates : hasUpstreamUpdates - } - - func updateTree(_ frame: CGFloat, forceUpdates: Bool = false) { - updateContents(frame, forceLocalUpdate: forceUpdates) - updateOutputs(frame, forceOutputUpdate: forceUpdates) - } - -} - -extension AnimatorNode { - /// Default implementation for Keypath searchable. - /// Forward all calls to the propertyMap. - - var keypathName: String { - propertyMap.keypathName - } - - var keypathProperties: [String: AnyNodeProperty] { - propertyMap.keypathProperties - } - - var childKeypaths: [KeypathSearchable] { - propertyMap.childKeypaths - } - - var keypathLayer: CALayer? { - nil - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Protocols/PathNode.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Protocols/PathNode.swift deleted file mode 100644 index 7eaa6cf..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Protocols/PathNode.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// PathNode.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/17/19. -// - -import Foundation - -// MARK: - PathNode - -protocol PathNode { - var pathOutput: PathOutputNode { get } -} - -extension PathNode where Self: AnimatorNode { - - var outputNode: NodeOutput { - pathOutput - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Protocols/RenderNode.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Protocols/RenderNode.swift deleted file mode 100644 index 9b4cfbf..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/Protocols/RenderNode.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// RenderNode.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/17/19. -// - -import CoreGraphics -import Foundation -import QuartzCore - -// MARK: - RenderNode - -/// A protocol that defines a node that holds render instructions -protocol RenderNode { - var renderer: Renderable & NodeOutput { get } -} - -// MARK: - Renderable - -/// A protocol that defines anything with render instructions -protocol Renderable { - - /// The last frame in which this node was updated. - var hasUpdate: Bool { get } - - func hasRenderUpdates(_ forFrame: CGFloat) -> Bool - - /// Determines if the renderer requires a custom context for drawing. - /// If yes the shape layer will perform a custom drawing pass. - /// If no the shape layer will be a standard CAShapeLayer - var shouldRenderInContext: Bool { get } - - /// Passes in the CAShapeLayer to update - func updateShapeLayer(layer: CAShapeLayer) - - /// Asks the renderer what the renderable bounds is for the given box. - func renderBoundsFor(_ boundingBox: CGRect) -> CGRect - - /// Opportunity for renderers to inject sublayers - func setupSublayers(layer: CAShapeLayer) - - /// Renders the shape in a custom context - func render(_ inContext: CGContext) -} - -extension RenderNode where Self: AnimatorNode { - - var outputNode: NodeOutput { - renderer - } - -} - -extension Renderable { - - func renderBoundsFor(_ boundingBox: CGRect) -> CGRect { - /// Optional - boundingBox - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeContainerLayer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeContainerLayer.swift deleted file mode 100644 index 25c2314..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeContainerLayer.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// ShapeContainerLayer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/30/19. -// - -import Foundation -import QuartzCore - -/// The base layer that holds Shapes and Shape Renderers -class ShapeContainerLayer: CALayer { - - // MARK: Lifecycle - - override init() { - super.init() - actions = [ - "position" : NSNull(), - "bounds" : NSNull(), - "anchorPoint" : NSNull(), - "transform" : NSNull(), - "opacity" : NSNull(), - "hidden" : NSNull(), - ] - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - override init(layer: Any) { - guard let layer = layer as? ShapeContainerLayer else { - fatalError("init(layer:) wrong class.") - } - super.init(layer: layer) - } - - // MARK: Internal - - private(set) var renderLayers: [ShapeContainerLayer] = [] - - var renderScale: CGFloat = 1 { - didSet { - updateRenderScale() - } - } - - func insertRenderLayer(_ layer: ShapeContainerLayer) { - renderLayers.append(layer) - insertSublayer(layer, at: 0) - } - - func markRenderUpdates(forFrame: CGFloat) { - if hasRenderUpdate(forFrame: forFrame) { - rebuildContents(forFrame: forFrame) - } - guard isHidden == false else { return } - renderLayers.forEach { $0.markRenderUpdates(forFrame: forFrame) } - } - - func hasRenderUpdate(forFrame _: CGFloat) -> Bool { - false - } - - func rebuildContents(forFrame _: CGFloat) { - /// Override - } - - func updateRenderScale() { - contentsScale = renderScale - renderLayers.forEach { $0.renderScale = renderScale } - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeRenderLayer.swift b/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeRenderLayer.swift deleted file mode 100644 index bba42e5..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeRenderLayer.swift +++ /dev/null @@ -1,99 +0,0 @@ -// -// RenderLayer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/18/19. -// - -import Foundation -import QuartzCore - -/// The layer responsible for rendering shape objects -final class ShapeRenderLayer: ShapeContainerLayer { - - // MARK: Lifecycle - - init(renderer: Renderable & NodeOutput) { - self.renderer = renderer - super.init() - anchorPoint = .zero - actions = [ - "position" : NSNull(), - "bounds" : NSNull(), - "anchorPoint" : NSNull(), - "path" : NSNull(), - "transform" : NSNull(), - "opacity" : NSNull(), - "hidden" : NSNull(), - ] - shapeLayer.actions = [ - "position" : NSNull(), - "bounds" : NSNull(), - "anchorPoint" : NSNull(), - "path" : NSNull(), - "fillColor" : NSNull(), - "strokeColor" : NSNull(), - "lineWidth" : NSNull(), - "miterLimit" : NSNull(), - "lineDashPhase" : NSNull(), - "opacity": NSNull(), - "hidden" : NSNull(), - ] - addSublayer(shapeLayer) - - renderer.setupSublayers(layer: shapeLayer) - } - - override init(layer: Any) { - guard let layer = layer as? ShapeRenderLayer else { - fatalError("init(layer:) wrong class.") - } - renderer = layer.renderer - super.init(layer: layer) - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - // MARK: Internal - - fileprivate(set) var renderer: Renderable & NodeOutput - - let shapeLayer = CAShapeLayer() - - override func hasRenderUpdate(forFrame: CGFloat) -> Bool { - isHidden = !renderer.isEnabled - guard isHidden == false else { return false } - return renderer.hasRenderUpdates(forFrame) - } - - override func rebuildContents(forFrame _: CGFloat) { - if renderer.shouldRenderInContext { - if let newPath = renderer.outputPath { - bounds = renderer.renderBoundsFor(newPath.boundingBox) - } else { - bounds = .zero - } - position = bounds.origin - setNeedsDisplay() - } else { - shapeLayer.path = renderer.outputPath - renderer.updateShapeLayer(layer: shapeLayer) - } - } - - override func draw(in ctx: CGContext) { - if let path = renderer.outputPath { - if !path.isEmpty { - ctx.addPath(path) - } - } - renderer.render(ctx) - } - - override func updateRenderScale() { - super.updateRenderScale() - shapeLayer.contentsScale = renderScale - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Assets/Asset.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Assets/Asset.swift deleted file mode 100644 index d610b1c..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Assets/Asset.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// Asset.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/9/19. -// - -import Foundation - -public class Asset: Codable, DictionaryInitializable { - - // MARK: Lifecycle - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: Asset.CodingKeys.self) - if let id = try? container.decode(String.self, forKey: .id) { - self.id = id - } else { - id = String(try container.decode(Int.self, forKey: .id)) - } - } - - required init(dictionary: [String: Any]) throws { - if let id = dictionary[CodingKeys.id.rawValue] as? String { - self.id = id - } else if let id = dictionary[CodingKeys.id.rawValue] as? Int { - self.id = String(id) - } else { - throw InitializableError.invalidInput - } - } - - // MARK: Public - - /// The ID of the asset - public let id: String - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case id - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Assets/AssetLibrary.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Assets/AssetLibrary.swift deleted file mode 100644 index ba44c3b..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Assets/AssetLibrary.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// AssetLibrary.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/9/19. -// - -import Foundation - -final class AssetLibrary: Codable, AnyInitializable { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - var container = try decoder.unkeyedContainer() - var containerForKeys = container - - var decodedAssets = [String : Asset]() - - var imageAssets = [String : ImageAsset]() - var precompAssets = [String : PrecompAsset]() - - while !container.isAtEnd { - let keyContainer = try containerForKeys.nestedContainer(keyedBy: PrecompAsset.CodingKeys.self) - if keyContainer.contains(.layers) { - let precompAsset = try container.decode(PrecompAsset.self) - decodedAssets[precompAsset.id] = precompAsset - precompAssets[precompAsset.id] = precompAsset - } else { - let imageAsset = try container.decode(ImageAsset.self) - decodedAssets[imageAsset.id] = imageAsset - imageAssets[imageAsset.id] = imageAsset - } - } - assets = decodedAssets - self.precompAssets = precompAssets - self.imageAssets = imageAssets - } - - init(value: Any) throws { - guard let dictionaries = value as? [[String: Any]] else { - throw InitializableError.invalidInput - } - var decodedAssets = [String : Asset]() - var imageAssets = [String : ImageAsset]() - var precompAssets = [String : PrecompAsset]() - try dictionaries.forEach { dictionary in - if dictionary[PrecompAsset.CodingKeys.layers.rawValue] != nil { - let asset = try PrecompAsset(dictionary: dictionary) - decodedAssets[asset.id] = asset - precompAssets[asset.id] = asset - } else { - let asset = try ImageAsset(dictionary: dictionary) - decodedAssets[asset.id] = asset - imageAssets[asset.id] = asset - } - } - assets = decodedAssets - self.precompAssets = precompAssets - self.imageAssets = imageAssets - } - - // MARK: Internal - - /// The Assets - let assets: [String: Asset] - - let imageAssets: [String: ImageAsset] - let precompAssets: [String: PrecompAsset] - - func encode(to encoder: Encoder) throws { - var container = encoder.unkeyedContainer() - try container.encode(contentsOf: Array(assets.values)) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Assets/ImageAsset.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Assets/ImageAsset.swift deleted file mode 100644 index 52c62ab..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Assets/ImageAsset.swift +++ /dev/null @@ -1,113 +0,0 @@ -// -// ImageAsset.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/9/19. -// - -import Foundation - -// MARK: - ImageAsset - -public final class ImageAsset: Asset { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: ImageAsset.CodingKeys.self) - name = try container.decode(String.self, forKey: .name) - directory = try container.decode(String.self, forKey: .directory) - width = try container.decode(Double.self, forKey: .width) - height = try container.decode(Double.self, forKey: .height) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - name = try dictionary.value(for: CodingKeys.name) - directory = try dictionary.value(for: CodingKeys.directory) - width = try dictionary.value(for: CodingKeys.width) - height = try dictionary.value(for: CodingKeys.height) - try super.init(dictionary: dictionary) - } - - // MARK: Public - - /// Image name - public let name: String - - /// Image Directory - public let directory: String - - /// Image Size - public let width: Double - - public let height: Double - - override public func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(name, forKey: .name) - try container.encode(directory, forKey: .directory) - try container.encode(width, forKey: .width) - try container.encode(height, forKey: .height) - } - - // MARK: Internal - - enum CodingKeys: String, CodingKey { - case name = "p" - case directory = "u" - case width = "w" - case height = "h" - } -} - -extension Data { - - // MARK: Lifecycle - - /// Initializes `Data` from an `ImageAsset`. - /// - /// Returns nil when the input is not recognized as valid Data URL. - /// - parameter imageAsset: The image asset that contains Data URL. - internal init?(imageAsset: ImageAsset) { - self.init(dataString: imageAsset.name) - } - - /// Initializes `Data` from a [Data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) String. - /// - /// Returns nil when the input is not recognized as valid Data URL. - /// - parameter dataString: The data string to parse. - /// - parameter options: Options for the string parsing. Default value is `[]`. - internal init?(dataString: String, options: DataURLReadOptions = []) { - let trimmedDataString = dataString.trimmingCharacters(in: .whitespacesAndNewlines) - guard - dataString.hasPrefix("data:"), - let url = URL(string: trimmedDataString) - else { - return nil - } - // The code below is needed because Data(contentsOf:) floods logs - // with messages since url doesn't have a host. This only fixes flooding logs - // when data inside Data URL is base64 encoded. - if - let base64Range = trimmedDataString.range(of: ";base64,"), - !options.contains(DataURLReadOptions.legacy) - { - let encodedString = String(trimmedDataString[base64Range.upperBound...]) - self.init(base64Encoded: encodedString) - } else { - try? self.init(contentsOf: url) - } - } - - // MARK: Internal - - internal struct DataURLReadOptions: OptionSet { - let rawValue: Int - - /// Will read Data URL using Data(contentsOf:) - static let legacy = DataURLReadOptions(rawValue: 1 << 0) - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Assets/PrecompAsset.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Assets/PrecompAsset.swift deleted file mode 100644 index e26ee7a..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Assets/PrecompAsset.swift +++ /dev/null @@ -1,40 +0,0 @@ -// -// PrecompAsset.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/9/19. -// - -import Foundation - -final class PrecompAsset: Asset { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: PrecompAsset.CodingKeys.self) - layers = try container.decode([LayerModel].self, ofFamily: LayerType.self, forKey: .layers) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - let layerDictionaries: [[String: Any]] = try dictionary.value(for: CodingKeys.layers) - layers = try [LayerModel].fromDictionaries(layerDictionaries) - try super.init(dictionary: dictionary) - } - - // MARK: Internal - - enum CodingKeys: String, CodingKey { - case layers - } - - /// Layers of the precomp - let layers: [LayerModel] - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(layers, forKey: .layers) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DictionaryInitializable.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DictionaryInitializable.swift deleted file mode 100644 index b53443a..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DictionaryInitializable.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// DictionaryInitializable.swift -// Lottie -// -// Created by Marcelo Fabri on 5/5/22. -// - -import Foundation - -// MARK: - InitializableError - -enum InitializableError: Error { - case invalidInput -} - -// MARK: - DictionaryInitializable - -protocol DictionaryInitializable { - - init(dictionary: [String: Any]) throws - -} - -// MARK: - AnyInitializable - -protocol AnyInitializable { - - init(value: Any) throws - -} - -extension Dictionary { - - @_disfavoredOverload - func value(for key: KeyType) throws -> T where KeyType.RawValue == Key { - guard let value = self[key.rawValue] as? T else { - throw InitializableError.invalidInput - } - return value - } - - func value(for key: KeyType) throws -> T where KeyType.RawValue == Key { - if let value = self[key.rawValue] as? T { - return value - } - - if let value = self[key.rawValue] { - return try T(value: value) - } - - throw InitializableError.invalidInput - } - -} - -// MARK: - Array + AnyInitializable - -extension Array: AnyInitializable where Element == Double { - - init(value: Any) throws { - guard let array = value as? [Double] else { - throw InitializableError.invalidInput - } - self = array - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/DotLottieAnimation.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/DotLottieAnimation.swift deleted file mode 100644 index c69a1b5..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/DotLottieAnimation.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// DotLottieAnimation.swift -// Pods -// -// Created by Evandro Harrison Hoffmann on 28/06/2021. -// - -import Foundation - -struct DotLottieAnimation: Codable { - /// Id of Animation - var id: String - - /// Loop enabled - var loop: Bool? = false - - /// Animation Playback Speed - var speed: Double? = 1 - - /// 1 or -1 - var direction: Int? = 1 - - /// mode - "bounce" | "normal" - var mode: String? = "normal" - - /// Loop mode for animation - var loopMode: LottieLoopMode { - mode == "bounce" ? .autoReverse : ((loop ?? false) ? .loop : .playOnce) - } - - /// Animation speed - var animationSpeed: Double { - (speed ?? 1) * Double(direction ?? 1) - } - - /// Loads `LottieAnimation` from `animationUrl` - /// - Returns: Deserialized `LottieAnimation`. Optional. - func animation(url: URL) throws -> LottieAnimation { - let animationUrl = url.appendingPathComponent("\(id).json") - let data = try Data(contentsOf: animationUrl) - return try LottieAnimation.from(data: data) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/DotLottieConfiguration.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/DotLottieConfiguration.swift deleted file mode 100644 index 5518167..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/DotLottieConfiguration.swift +++ /dev/null @@ -1,15 +0,0 @@ -// -// DotLottieSettings.swift -// Lottie -// -// Created by Evandro Hoffmann on 19/10/22. -// - -import Foundation - -struct DotLottieConfiguration { - var id: String - var imageProvider: AnimationImageProvider? - var loopMode: LottieLoopMode - var speed: Double -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/DotLottieImageProvider.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/DotLottieImageProvider.swift deleted file mode 100644 index 8d3afe9..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/DotLottieImageProvider.swift +++ /dev/null @@ -1,73 +0,0 @@ -// -// DotLottieImageProvider.swift -// Lottie -// -// Created by Evandro Hoffmann on 20/10/22. -// - -import Foundation -#if os(iOS) || os(tvOS) || os(watchOS) || targetEnvironment(macCatalyst) -import UIKit -#elseif os(macOS) -import AppKit -#endif - -// MARK: - DotLottieImageProvider - -/// An image provider that loads the images from a DotLottieFile into memory -class DotLottieImageProvider: AnimationImageProvider { - - // MARK: Lifecycle - - /// Initializes an image provider with a specific filepath. - /// - /// - Parameter filepath: The absolute filepath containing the images. - /// - init(filepath: String) { - self.filepath = URL(fileURLWithPath: filepath) - loadImages() - } - - init(filepath: URL) { - self.filepath = filepath - loadImages() - } - - // MARK: Internal - - let filepath: URL - - func imageForAsset(asset: ImageAsset) -> CGImage? { - images[asset.name] - } - - // MARK: Private - - /// This is intentionally a Dictionary instead of an NSCache. Files from a decompressed dotLottie zip archive - /// are only valid are deleted after being read into memory. If we used an NSCache then the OS could evict - /// the cache entries when under memory pressure, and we would have no way to reload them later. - /// - Ideally we would have a way to remove image data when under memory pressure, but this would require - /// re-decompressing the dotLottie file when requesting an image that has been loaded but then removed. - private var images = [String: CGImage]() - - private func loadImages() { - filepath.urls.forEach { - #if os(iOS) || os(tvOS) || os(watchOS) || targetEnvironment(macCatalyst) - if - let data = try? Data(contentsOf: $0), - let image = UIImage(data: data)?.cgImage - { - images[$0.lastPathComponent] = image - } - #elseif os(macOS) - if - let data = try? Data(contentsOf: $0), - let image = NSImage(data: data)?.lottie_CGImage - { - images[$0.lastPathComponent] = image - } - #endif - } - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/DotLottieManifest.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/DotLottieManifest.swift deleted file mode 100644 index d475092..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/DotLottieManifest.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// DotLottieManifest.swift -// Lottie -// -// Created by Evandro Harrison Hoffmann on 27/06/2020. -// - -import Foundation - -/// Manifest model for .lottie File -struct DotLottieManifest: Codable { - - var animations: [DotLottieAnimation] - var version: String? - var author: String? - var generator: String? - - /// Decodes data to Manifest model - /// - Parameter data: Data to decode - /// - Throws: Error - /// - Returns: .lottie Manifest model - static func decode(from data: Data) throws -> DotLottieManifest { - try JSONDecoder().decode(DotLottieManifest.self, from: data) - } - - /// Loads manifest from given URL - /// - Parameter path: URL path to Manifest - /// - Returns: Manifest Model - static func load(from url: URL) throws -> DotLottieManifest { - let data = try Data(contentsOf: url) - return try decode(from: data) - } - - /// Encodes to data - /// - Parameter encoder: JSONEncoder - /// - Throws: Error - /// - Returns: encoded Data - func encode(with encoder: JSONEncoder = JSONEncoder()) throws -> Data { - try encoder.encode(self) - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/DotLottieUtils.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/DotLottieUtils.swift deleted file mode 100644 index 1efcd1d..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/DotLottieUtils.swift +++ /dev/null @@ -1,68 +0,0 @@ -// -// DotLottieUtils.swift -// Lottie -// -// Created by Evandro Harrison Hoffmann on 27/06/2020. -// - -import Foundation - -// MARK: - DotLottieUtils - -struct DotLottieUtils { - static let dotLottieExtension = "lottie" - static let jsonExtension = "json" - - /// Temp folder to app directory - static var tempDirectoryURL: URL { - if #available(iOS 10.0, macOS 10.12, *) { - return FileManager.default.temporaryDirectory - } - return URL(fileURLWithPath: NSTemporaryDirectory()) - } -} - -extension URL { - /// Checks if url is a lottie file - var isDotLottie: Bool { - pathExtension == DotLottieUtils.dotLottieExtension - } - - /// Checks if url is a json file - var isJsonFile: Bool { - pathExtension == DotLottieUtils.jsonExtension - } - - var urls: [URL] { - FileManager.default.urls(for: self) ?? [] - } -} - -extension FileManager { - /// Lists urls for all files in a directory - /// - Parameters: - /// - url: URL of directory to search - /// - skipsHiddenFiles: If should or not show hidden files - /// - Returns: Returns urls of all files matching criteria in the directory - func urls(for url: URL, skipsHiddenFiles: Bool = true) -> [URL]? { - try? contentsOfDirectory(at: url, includingPropertiesForKeys: nil, options: skipsHiddenFiles ? .skipsHiddenFiles : []) - } -} - -// MARK: - DotLottieError - -public enum DotLottieError: Error { - /// URL response has no data. - case noDataLoaded - /// Asset with this name was not found in the provided bundle. - case assetNotFound(name: String, bundle: Bundle?) - /// Animation loading from asset is not supported on macOS 10.10. - case loadingFromAssetNotSupported - - @available(*, deprecated, message: "Unused") - case invalidFileFormat - @available(*, deprecated, message: "Unused") - case invalidData - @available(*, deprecated, message: "Unused") - case animationNotAvailable -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+BackingConfiguration.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+BackingConfiguration.swift deleted file mode 100644 index 0a3f0cd..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+BackingConfiguration.swift +++ /dev/null @@ -1,147 +0,0 @@ -// -// Archive+BackingConfiguration.swift -// ZIPFoundation -// -// Copyright © 2017-2021 Thomas Zoechling, https://www.peakstep.com and the ZIP Foundation project authors. -// Released under the MIT License. -// -// See https://github.com/weichsel/ZIPFoundation/blob/master/LICENSE for license information. -// - -import Foundation - -extension Archive { - - struct BackingConfiguration { - let file: FILEPointer - let endOfCentralDirectoryRecord: EndOfCentralDirectoryRecord - let zip64EndOfCentralDirectory: ZIP64EndOfCentralDirectory? - - #if swift(>=5.0) - let memoryFile: MemoryFile? - - init( - file: FILEPointer, - endOfCentralDirectoryRecord: EndOfCentralDirectoryRecord, - zip64EndOfCentralDirectory: ZIP64EndOfCentralDirectory? = nil, - memoryFile: MemoryFile? = nil) - { - self.file = file - self.endOfCentralDirectoryRecord = endOfCentralDirectoryRecord - self.zip64EndOfCentralDirectory = zip64EndOfCentralDirectory - self.memoryFile = memoryFile - } - #else - - init( - file: FILEPointer, - endOfCentralDirectoryRecord: EndOfCentralDirectoryRecord, - zip64EndOfCentralDirectory: ZIP64EndOfCentralDirectory?) - { - self.file = file - self.endOfCentralDirectoryRecord = endOfCentralDirectoryRecord - self.zip64EndOfCentralDirectory = zip64EndOfCentralDirectory - } - #endif - } - - static func makeBackingConfiguration(for url: URL, mode: AccessMode) - -> BackingConfiguration? - { - let fileManager = FileManager() - switch mode { - case .read: - let fileSystemRepresentation = fileManager.fileSystemRepresentation(withPath: url.path) - guard - let archiveFile = fopen(fileSystemRepresentation, "rb"), - let (eocdRecord, zip64EOCD) = Archive.scanForEndOfCentralDirectoryRecord(in: archiveFile) else - { - return nil - } - return BackingConfiguration( - file: archiveFile, - endOfCentralDirectoryRecord: eocdRecord, - zip64EndOfCentralDirectory: zip64EOCD) - case .create: - let endOfCentralDirectoryRecord = EndOfCentralDirectoryRecord( - numberOfDisk: 0, - numberOfDiskStart: 0, - totalNumberOfEntriesOnDisk: 0, - totalNumberOfEntriesInCentralDirectory: 0, - sizeOfCentralDirectory: 0, - offsetToStartOfCentralDirectory: 0, - zipFileCommentLength: 0, - zipFileCommentData: Data()) - do { - try endOfCentralDirectoryRecord.data.write(to: url, options: .withoutOverwriting) - } catch { return nil } - fallthrough - case .update: - let fileSystemRepresentation = fileManager.fileSystemRepresentation(withPath: url.path) - guard - let archiveFile = fopen(fileSystemRepresentation, "rb+"), - let (eocdRecord, zip64EOCD) = Archive.scanForEndOfCentralDirectoryRecord(in: archiveFile) else - { - return nil - } - fseeko(archiveFile, 0, SEEK_SET) - return BackingConfiguration( - file: archiveFile, - endOfCentralDirectoryRecord: eocdRecord, - zip64EndOfCentralDirectory: zip64EOCD) - } - } - - #if swift(>=5.0) - static func makeBackingConfiguration(for data: Data, mode: AccessMode) - -> BackingConfiguration? - { - let posixMode: String - switch mode { - case .read: posixMode = "rb" - case .create: posixMode = "wb+" - case .update: posixMode = "rb+" - } - let memoryFile = MemoryFile(data: data) - guard let archiveFile = memoryFile.open(mode: posixMode) else { return nil } - - switch mode { - case .read: - guard let (eocdRecord, zip64EOCD) = Archive.scanForEndOfCentralDirectoryRecord(in: archiveFile) else { - return nil - } - - return BackingConfiguration( - file: archiveFile, - endOfCentralDirectoryRecord: eocdRecord, - zip64EndOfCentralDirectory: zip64EOCD, - memoryFile: memoryFile) - case .create: - let endOfCentralDirectoryRecord = EndOfCentralDirectoryRecord( - numberOfDisk: 0, - numberOfDiskStart: 0, - totalNumberOfEntriesOnDisk: 0, - totalNumberOfEntriesInCentralDirectory: 0, - sizeOfCentralDirectory: 0, - offsetToStartOfCentralDirectory: 0, - zipFileCommentLength: 0, - zipFileCommentData: Data()) - _ = endOfCentralDirectoryRecord.data.withUnsafeBytes { (buffer: UnsafeRawBufferPointer) in - fwrite(buffer.baseAddress, buffer.count, 1, archiveFile) // Errors handled during read - } - fallthrough - case .update: - guard let (eocdRecord, zip64EOCD) = Archive.scanForEndOfCentralDirectoryRecord(in: archiveFile) else { - return nil - } - - fseeko(archiveFile, 0, SEEK_SET) - return BackingConfiguration( - file: archiveFile, - endOfCentralDirectoryRecord: eocdRecord, - zip64EndOfCentralDirectory: zip64EOCD, - memoryFile: memoryFile) - } - } - #endif -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+Helpers.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+Helpers.swift deleted file mode 100644 index 826a8d5..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+Helpers.swift +++ /dev/null @@ -1,351 +0,0 @@ -// -// Archive+Helpers.swift -// ZIPFoundation -// -// Copyright © 2017-2021 Thomas Zoechling, https://www.peakstep.com and the ZIP Foundation project authors. -// Released under the MIT License. -// -// See https://github.com/weichsel/ZIPFoundation/blob/master/LICENSE for license information. -// - -import Foundation - -extension Archive { - - // MARK: - Reading - - func readUncompressed( - entry: Entry, - bufferSize: Int, - skipCRC32: Bool, - progress: Progress? = nil, - with consumer: Consumer) - throws -> CRC32 - { - let size = entry.centralDirectoryStructure.effectiveUncompressedSize - guard size <= .max else { throw ArchiveError.invalidEntrySize } - return try Data.consumePart( - of: Int64(size), - chunkSize: bufferSize, - skipCRC32: skipCRC32, - provider: { _, chunkSize -> Data in - try Data.readChunk(of: chunkSize, from: self.archiveFile) - }, - consumer: { data in - if progress?.isCancelled == true { throw ArchiveError.cancelledOperation } - try consumer(data) - progress?.completedUnitCount += Int64(data.count) - }) - } - - func readCompressed( - entry: Entry, - bufferSize: Int, - skipCRC32: Bool, - progress: Progress? = nil, - with consumer: Consumer) - throws -> CRC32 - { - let size = entry.centralDirectoryStructure.effectiveCompressedSize - guard size <= .max else { throw ArchiveError.invalidEntrySize } - return try Data.decompress( - size: Int64(size), - bufferSize: bufferSize, - skipCRC32: skipCRC32, - provider: { _, chunkSize -> Data in - try Data.readChunk(of: chunkSize, from: self.archiveFile) - }, - consumer: { data in - if progress?.isCancelled == true { throw ArchiveError.cancelledOperation } - try consumer(data) - progress?.completedUnitCount += Int64(data.count) - }) - } - - // MARK: - Writing - - func writeEntry( - uncompressedSize: Int64, - type: Entry.EntryType, - compressionMethod: CompressionMethod, - bufferSize: Int, - progress: Progress? = nil, - provider: Provider) throws -> (sizeWritten: Int64, crc32: CRC32) - { - var checksum = CRC32(0) - var sizeWritten = Int64(0) - switch type { - case .file: - switch compressionMethod { - case .none: - (sizeWritten, checksum) = try writeUncompressed( - size: uncompressedSize, - bufferSize: bufferSize, - progress: progress, - provider: provider) - case .deflate: - (sizeWritten, checksum) = try writeCompressed( - size: uncompressedSize, - bufferSize: bufferSize, - progress: progress, - provider: provider) - } - case .directory: - _ = try provider(0, 0) - if let progress = progress { progress.completedUnitCount = progress.totalUnitCount } - case .symlink: - let (linkSizeWritten, linkChecksum) = try writeSymbolicLink( - size: Int(uncompressedSize), - provider: provider) - (sizeWritten, checksum) = (Int64(linkSizeWritten), linkChecksum) - if let progress = progress { progress.completedUnitCount = progress.totalUnitCount } - } - return (sizeWritten, checksum) - } - - func writeLocalFileHeader( - path: String, - compressionMethod: CompressionMethod, - size: (uncompressed: UInt64, compressed: UInt64), - checksum: CRC32, - modificationDateTime: (UInt16, UInt16)) - throws -> LocalFileHeader - { - // We always set Bit 11 in generalPurposeBitFlag, which indicates an UTF-8 encoded path. - guard let fileNameData = path.data(using: .utf8) else { throw ArchiveError.invalidEntryPath } - - var uncompressedSizeOfLFH = UInt32(0) - var compressedSizeOfLFH = UInt32(0) - var extraFieldLength = UInt16(0) - var zip64ExtendedInformation: Entry.ZIP64ExtendedInformation? - var versionNeededToExtract = Version.v20.rawValue - // ZIP64 Extended Information in the Local header MUST include BOTH original and compressed file size fields. - if size.uncompressed >= maxUncompressedSize || size.compressed >= maxCompressedSize { - uncompressedSizeOfLFH = .max - compressedSizeOfLFH = .max - extraFieldLength = UInt16(20) // 2 + 2 + 8 + 8 - versionNeededToExtract = Version.v45.rawValue - zip64ExtendedInformation = Entry.ZIP64ExtendedInformation( - dataSize: extraFieldLength - 4, - uncompressedSize: size.uncompressed, - compressedSize: size.compressed, - relativeOffsetOfLocalHeader: 0, - diskNumberStart: 0) - } else { - uncompressedSizeOfLFH = UInt32(size.uncompressed) - compressedSizeOfLFH = UInt32(size.compressed) - } - - let localFileHeader = LocalFileHeader( - versionNeededToExtract: versionNeededToExtract, - generalPurposeBitFlag: UInt16(2048), - compressionMethod: compressionMethod.rawValue, - lastModFileTime: modificationDateTime.1, - lastModFileDate: modificationDateTime.0, - crc32: checksum, - compressedSize: compressedSizeOfLFH, - uncompressedSize: uncompressedSizeOfLFH, - fileNameLength: UInt16(fileNameData.count), - extraFieldLength: extraFieldLength, - fileNameData: fileNameData, - extraFieldData: zip64ExtendedInformation?.data ?? Data()) - _ = try Data.write(chunk: localFileHeader.data, to: archiveFile) - return localFileHeader - } - - func writeCentralDirectoryStructure( - localFileHeader: LocalFileHeader, - relativeOffset: UInt64, - externalFileAttributes: UInt32) - throws -> CentralDirectoryStructure - { - var extraUncompressedSize: UInt64? - var extraCompressedSize: UInt64? - var extraOffset: UInt64? - var relativeOffsetOfCD = UInt32(0) - var extraFieldLength = UInt16(0) - var zip64ExtendedInformation: Entry.ZIP64ExtendedInformation? - if localFileHeader.uncompressedSize == .max || localFileHeader.compressedSize == .max { - let zip64Field = Entry.ZIP64ExtendedInformation - .scanForZIP64Field(in: localFileHeader.extraFieldData, fields: [.uncompressedSize, .compressedSize]) - extraUncompressedSize = zip64Field?.uncompressedSize - extraCompressedSize = zip64Field?.compressedSize - } - if relativeOffset >= maxOffsetOfLocalFileHeader { - extraOffset = relativeOffset - relativeOffsetOfCD = .max - } else { - relativeOffsetOfCD = UInt32(relativeOffset) - } - extraFieldLength = [extraUncompressedSize, extraCompressedSize, extraOffset] - .compactMap { $0 } - .reduce(UInt16(0)) { $0 + UInt16(MemoryLayout.size(ofValue: $1)) } - if extraFieldLength > 0 { - // Size of extra fields, shouldn't include the leading 4 bytes - zip64ExtendedInformation = Entry.ZIP64ExtendedInformation( - dataSize: extraFieldLength, - uncompressedSize: extraUncompressedSize ?? 0, - compressedSize: extraCompressedSize ?? 0, - relativeOffsetOfLocalHeader: extraOffset ?? 0, - diskNumberStart: 0) - extraFieldLength += Entry.ZIP64ExtendedInformation.headerSize - } - let centralDirectory = CentralDirectoryStructure( - localFileHeader: localFileHeader, - fileAttributes: externalFileAttributes, - relativeOffset: relativeOffsetOfCD, - extraField: ( - extraFieldLength, - zip64ExtendedInformation?.data ?? Data())) - _ = try Data.write(chunk: centralDirectory.data, to: archiveFile) - return centralDirectory - } - - func writeEndOfCentralDirectory( - centralDirectoryStructure: CentralDirectoryStructure, - startOfCentralDirectory: UInt64, - startOfEndOfCentralDirectory: UInt64, - operation: ModifyOperation) - throws -> EndOfCentralDirectoryStructure - { - var record = endOfCentralDirectoryRecord - let sizeOfCD = sizeOfCentralDirectory - let numberOfTotalEntries = totalNumberOfEntriesInCentralDirectory - let countChange = operation.rawValue - var dataLength = centralDirectoryStructure.extraFieldLength - dataLength += centralDirectoryStructure.fileNameLength - dataLength += centralDirectoryStructure.fileCommentLength - let cdDataLengthChange = countChange * (Int(dataLength) + CentralDirectoryStructure.size) - let (updatedSizeOfCD, updatedNumberOfEntries): (UInt64, UInt64) = try { - switch operation { - case .add: - guard .max - sizeOfCD >= cdDataLengthChange else { - throw ArchiveError.invalidCentralDirectorySize - } - guard .max - numberOfTotalEntries >= countChange else { - throw ArchiveError.invalidCentralDirectoryEntryCount - } - return (sizeOfCD + UInt64(cdDataLengthChange), numberOfTotalEntries + UInt64(countChange)) - case .remove: - return (sizeOfCD - UInt64(-cdDataLengthChange), numberOfTotalEntries - UInt64(-countChange)) - } - }() - let sizeOfCDForEOCD = updatedSizeOfCD >= maxSizeOfCentralDirectory - ? UInt32.max - : UInt32(updatedSizeOfCD) - let numberOfTotalEntriesForEOCD = updatedNumberOfEntries >= maxTotalNumberOfEntries - ? UInt16.max - : UInt16(updatedNumberOfEntries) - let offsetOfCDForEOCD = startOfCentralDirectory >= maxOffsetOfCentralDirectory - ? UInt32.max - : UInt32(startOfCentralDirectory) - // ZIP64 End of Central Directory - var zip64EOCD: ZIP64EndOfCentralDirectory? - if numberOfTotalEntriesForEOCD == .max || offsetOfCDForEOCD == .max || sizeOfCDForEOCD == .max { - zip64EOCD = try writeZIP64EOCD( - totalNumberOfEntries: updatedNumberOfEntries, - sizeOfCentralDirectory: updatedSizeOfCD, - offsetOfCentralDirectory: startOfCentralDirectory, - offsetOfEndOfCentralDirectory: startOfEndOfCentralDirectory) - } - record = EndOfCentralDirectoryRecord( - record: record, - numberOfEntriesOnDisk: numberOfTotalEntriesForEOCD, - numberOfEntriesInCentralDirectory: numberOfTotalEntriesForEOCD, - updatedSizeOfCentralDirectory: sizeOfCDForEOCD, - startOfCentralDirectory: offsetOfCDForEOCD) - _ = try Data.write(chunk: record.data, to: archiveFile) - return (record, zip64EOCD) - } - - func writeUncompressed( - size: Int64, - bufferSize: Int, - progress: Progress? = nil, - provider: Provider) throws -> (sizeWritten: Int64, checksum: CRC32) - { - var position: Int64 = 0 - var sizeWritten: Int64 = 0 - var checksum = CRC32(0) - while position < size { - if progress?.isCancelled == true { throw ArchiveError.cancelledOperation } - let readSize = (size - position) >= bufferSize ? bufferSize : Int(size - position) - let entryChunk = try provider(position, readSize) - checksum = entryChunk.crc32(checksum: checksum) - sizeWritten += Int64(try Data.write(chunk: entryChunk, to: archiveFile)) - position += Int64(bufferSize) - progress?.completedUnitCount = sizeWritten - } - return (sizeWritten, checksum) - } - - func writeCompressed( - size: Int64, - bufferSize: Int, - progress: Progress? = nil, - provider: Provider) throws -> (sizeWritten: Int64, checksum: CRC32) - { - var sizeWritten: Int64 = 0 - let consumer: Consumer = { data in sizeWritten += Int64(try Data.write(chunk: data, to: self.archiveFile)) } - let checksum = try Data.compress( - size: size, - bufferSize: bufferSize, - provider: { position, size -> Data in - if progress?.isCancelled == true { throw ArchiveError.cancelledOperation } - let data = try provider(position, size) - progress?.completedUnitCount += Int64(data.count) - return data - }, - consumer: consumer) - return (sizeWritten, checksum) - } - - func writeSymbolicLink(size: Int, provider: Provider) throws -> (sizeWritten: Int, checksum: CRC32) { - // The reported size of a symlink is the number of characters in the path it points to. - let linkData = try provider(0, size) - let checksum = linkData.crc32(checksum: 0) - let sizeWritten = try Data.write(chunk: linkData, to: archiveFile) - return (sizeWritten, checksum) - } - - func writeZIP64EOCD( - totalNumberOfEntries: UInt64, - sizeOfCentralDirectory: UInt64, - offsetOfCentralDirectory: UInt64, - offsetOfEndOfCentralDirectory: UInt64) - throws -> ZIP64EndOfCentralDirectory - { - var zip64EOCD: ZIP64EndOfCentralDirectory = zip64EndOfCentralDirectory ?? { - // Shouldn't include the leading 12 bytes: (size - 12 = 44) - let record = ZIP64EndOfCentralDirectoryRecord( - sizeOfZIP64EndOfCentralDirectoryRecord: UInt64(44), - versionMadeBy: UInt16(789), - versionNeededToExtract: Version.v45.rawValue, - numberOfDisk: 0, - numberOfDiskStart: 0, - totalNumberOfEntriesOnDisk: 0, - totalNumberOfEntriesInCentralDirectory: 0, - sizeOfCentralDirectory: 0, - offsetToStartOfCentralDirectory: 0, - zip64ExtensibleDataSector: Data()) - let locator = ZIP64EndOfCentralDirectoryLocator( - numberOfDiskWithZIP64EOCDRecordStart: 0, - relativeOffsetOfZIP64EOCDRecord: 0, - totalNumberOfDisk: 1) - return ZIP64EndOfCentralDirectory(record: record, locator: locator) - }() - - let updatedRecord = ZIP64EndOfCentralDirectoryRecord( - record: zip64EOCD.record, - numberOfEntriesOnDisk: totalNumberOfEntries, - numberOfEntriesInCD: totalNumberOfEntries, - sizeOfCentralDirectory: sizeOfCentralDirectory, - offsetToStartOfCD: offsetOfCentralDirectory) - let updatedLocator = ZIP64EndOfCentralDirectoryLocator( - locator: zip64EOCD.locator, - offsetOfZIP64EOCDRecord: offsetOfEndOfCentralDirectory) - zip64EOCD = ZIP64EndOfCentralDirectory(record: updatedRecord, locator: updatedLocator) - _ = try Data.write(chunk: zip64EOCD.data, to: archiveFile) - return zip64EOCD - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+MemoryFile.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+MemoryFile.swift deleted file mode 100644 index ab66af2..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+MemoryFile.swift +++ /dev/null @@ -1,183 +0,0 @@ -// -// Archive+MemoryFile.swift -// ZIPFoundation -// -// Copyright © 2017-2021 Thomas Zoechling, https://www.peakstep.com and the ZIP Foundation project authors. -// Released under the MIT License. -// -// See https://github.com/weichsel/ZIPFoundation/blob/master/LICENSE for license information. -// - -import Foundation - -extension Archive { - var isMemoryArchive: Bool { url.scheme == memoryURLScheme } -} - -#if swift(>=5.0) - -extension Archive { - /// Returns a `Data` object containing a representation of the receiver. - var data: Data? { memoryFile?.data } -} - -class MemoryFile { - - // MARK: Lifecycle - - init(data: Data = Data()) { - self.data = data - } - - // MARK: Internal - - private(set) var data: Data - - func open(mode: String) -> FILEPointer? { - let cookie = Unmanaged.passRetained(self) - let writable = mode.count > 0 && (mode.first! != "r" || mode.last! == "+") - let append = mode.count > 0 && mode.first! == "a" - #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(Android) - let result = writable - ? funopen(cookie.toOpaque(), readStub, writeStub, seekStub, closeStub) - : funopen(cookie.toOpaque(), readStub, nil, seekStub, closeStub) - #else - let stubs = cookie_io_functions_t(read: readStub, write: writeStub, seek: seekStub, close: closeStub) - let result = fopencookie(cookie.toOpaque(), mode, stubs) - #endif - if append { - fseeko(result, 0, SEEK_END) - } - return result - } - - // MARK: Private - - private var offset = 0 - -} - -extension MemoryFile { - fileprivate func readData(buffer: UnsafeMutableRawBufferPointer) -> Int { - let size = min(buffer.count, data.count - offset) - let start = data.startIndex - data.copyBytes(to: buffer.bindMemory(to: UInt8.self), from: start + offset.. Int { - let start = data.startIndex - if offset < data.count, offset + buffer.count > data.count { - data.removeSubrange(start + offset.. data.count { - data.append(Data(count: offset - data.count)) - } - if offset == data.count { - data.append(buffer.bindMemory(to: UInt8.self)) - } else { - let start = data.startIndex // May have changed in earlier mutation - data.replaceSubrange(start + offset.. Int { - var result = -1 - if whence == SEEK_SET { - result = offset - } else if whence == SEEK_CUR { - result = self.offset + offset - } else if whence == SEEK_END { - result = data.count + offset - } - self.offset = result - return self.offset - } -} - -private func fileFromCookie(cookie: UnsafeRawPointer) -> MemoryFile { - Unmanaged.fromOpaque(cookie).takeUnretainedValue() -} - -private func closeStub(_ cookie: UnsafeMutableRawPointer?) -> Int32 { - if let cookie = cookie { - Unmanaged.fromOpaque(cookie).release() - } - return 0 -} - -#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(Android) -private func readStub( - _ cookie: UnsafeMutableRawPointer?, - _ bytePtr: UnsafeMutablePointer?, - _ count: Int32) - -> Int32 -{ - guard let cookie = cookie, let bytePtr = bytePtr else { return 0 } - return Int32(fileFromCookie(cookie: cookie).readData( - buffer: UnsafeMutableRawBufferPointer(start: bytePtr, count: Int(count)))) -} - -private func writeStub( - _ cookie: UnsafeMutableRawPointer?, - _ bytePtr: UnsafePointer?, - _ count: Int32) - -> Int32 -{ - guard let cookie = cookie, let bytePtr = bytePtr else { return 0 } - return Int32(fileFromCookie(cookie: cookie).writeData( - buffer: UnsafeRawBufferPointer(start: bytePtr, count: Int(count)))) -} - -private func seekStub( - _ cookie: UnsafeMutableRawPointer?, - _ offset: fpos_t, - _ whence: Int32) - -> fpos_t -{ - guard let cookie = cookie else { return 0 } - return fpos_t(fileFromCookie(cookie: cookie).seek(offset: Int(offset), whence: whence)) -} - -#else -private func readStub( - _ cookie: UnsafeMutableRawPointer?, - _ bytePtr: UnsafeMutablePointer?, - _ count: Int) - -> Int -{ - guard let cookie = cookie, let bytePtr = bytePtr else { return 0 } - return fileFromCookie(cookie: cookie).readData( - buffer: UnsafeMutableRawBufferPointer(start: bytePtr, count: count)) -} - -private func writeStub( - _ cookie: UnsafeMutableRawPointer?, - _ bytePtr: UnsafePointer?, - _ count: Int) - -> Int -{ - guard let cookie = cookie, let bytePtr = bytePtr else { return 0 } - return fileFromCookie(cookie: cookie).writeData( - buffer: UnsafeRawBufferPointer(start: bytePtr, count: count)) -} - -private func seekStub( - _ cookie: UnsafeMutableRawPointer?, - _ offset: UnsafeMutablePointer?, - _ whence: Int32) - -> Int32 -{ - guard let cookie = cookie, let offset = offset else { return 0 } - let result = fileFromCookie(cookie: cookie).seek(offset: Int(offset.pointee), whence: whence) - if result >= 0 { - offset.pointee = result - return 0 - } else { - return -1 - } -} -#endif -#endif diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+Progress.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+Progress.swift deleted file mode 100644 index f8c3bd6..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+Progress.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// Archive+Progress.swift -// ZIPFoundation -// -// Copyright © 2017-2021 Thomas Zoechling, https://www.peakstep.com and the ZIP Foundation project authors. -// Released under the MIT License. -// -// See https://github.com/weichsel/ZIPFoundation/blob/master/LICENSE for license information. -// - -import Foundation - -extension Archive { - /// The number of the work units that have to be performed when - /// removing `entry` from the receiver. - /// - /// - Parameter entry: The entry that will be removed. - /// - Returns: The number of the work units. - func totalUnitCountForRemoving(_ entry: Entry) -> Int64 { - Int64(offsetToStartOfCentralDirectory - entry.localSize) - } - - func makeProgressForRemoving(_ entry: Entry) -> Progress { - Progress(totalUnitCount: totalUnitCountForRemoving(entry)) - } - - /// The number of the work units that have to be performed when - /// reading `entry` from the receiver. - /// - /// - Parameter entry: The entry that will be read. - /// - Returns: The number of the work units. - func totalUnitCountForReading(_ entry: Entry) -> Int64 { - switch entry.type { - case .file, .symlink: - return Int64(entry.uncompressedSize) - case .directory: - return defaultDirectoryUnitCount - } - } - - func makeProgressForReading(_ entry: Entry) -> Progress { - Progress(totalUnitCount: totalUnitCountForReading(entry)) - } - - /// The number of the work units that have to be performed when - /// adding the file at `url` to the receiver. - /// - Parameter entry: The entry that will be removed. - /// - Returns: The number of the work units. - func totalUnitCountForAddingItem(at url: URL) -> Int64 { - var count = Int64(0) - do { - let type = try FileManager.typeForItem(at: url) - switch type { - case .file, .symlink: - count = Int64(try FileManager.fileSizeForItem(at: url)) - case .directory: - count = defaultDirectoryUnitCount - } - } catch { count = -1 } - return count - } - - func makeProgressForAddingItem(at url: URL) -> Progress { - Progress(totalUnitCount: totalUnitCountForAddingItem(at: url)) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+Reading.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+Reading.swift deleted file mode 100644 index cf5510d..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+Reading.swift +++ /dev/null @@ -1,144 +0,0 @@ -// -// Archive+Reading.swift -// ZIPFoundation -// -// Copyright © 2017-2021 Thomas Zoechling, https://www.peakstep.com and the ZIP Foundation project authors. -// Released under the MIT License. -// -// See https://github.com/weichsel/ZIPFoundation/blob/master/LICENSE for license information. -// - -import Foundation - -extension Archive { - /// Read a ZIP `Entry` from the receiver and write it to `url`. - /// - /// - Parameters: - /// - entry: The ZIP `Entry` to read. - /// - url: The destination file URL. - /// - bufferSize: The maximum size of the read buffer and the decompression buffer (if needed). - /// - skipCRC32: Optional flag to skip calculation of the CRC32 checksum to improve performance. - /// - progress: A progress object that can be used to track or cancel the extract operation. - /// - Returns: The checksum of the processed content or 0 if the `skipCRC32` flag was set to `true`. - /// - Throws: An error if the destination file cannot be written or the entry contains malformed content. - func extract( - _ entry: Entry, - to url: URL, - bufferSize: Int = defaultReadChunkSize, - skipCRC32: Bool = false, - progress: Progress? = nil) - throws -> CRC32 - { - guard bufferSize > 0 else { - throw ArchiveError.invalidBufferSize - } - let fileManager = FileManager() - var checksum = CRC32(0) - switch entry.type { - case .file: - guard !fileManager.itemExists(at: url) else { - throw CocoaError(.fileWriteFileExists, userInfo: [NSFilePathErrorKey: url.path]) - } - try fileManager.createParentDirectoryStructure(for: url) - let destinationRepresentation = fileManager.fileSystemRepresentation(withPath: url.path) - guard let destinationFile: FILEPointer = fopen(destinationRepresentation, "wb+") else { - throw CocoaError(.fileNoSuchFile) - } - defer { fclose(destinationFile) } - let consumer = { _ = try Data.write(chunk: $0, to: destinationFile) } - checksum = try extract( - entry, - bufferSize: bufferSize, - skipCRC32: skipCRC32, - progress: progress, - consumer: consumer) - case .directory: - let consumer = { (_: Data) in - try fileManager.createDirectory(at: url, withIntermediateDirectories: true, attributes: nil) - } - checksum = try extract( - entry, - bufferSize: bufferSize, - skipCRC32: skipCRC32, - progress: progress, - consumer: consumer) - case .symlink: - guard !fileManager.itemExists(at: url) else { - throw CocoaError(.fileWriteFileExists, userInfo: [NSFilePathErrorKey: url.path]) - } - let consumer = { (data: Data) in - guard let linkPath = String(data: data, encoding: .utf8) else { throw ArchiveError.invalidEntryPath } - try fileManager.createParentDirectoryStructure(for: url) - try fileManager.createSymbolicLink(atPath: url.path, withDestinationPath: linkPath) - } - checksum = try extract( - entry, - bufferSize: bufferSize, - skipCRC32: skipCRC32, - progress: progress, - consumer: consumer) - } - let attributes = FileManager.attributes(from: entry) - try fileManager.setAttributes(attributes, ofItemAtPath: url.path) - return checksum - } - - /// Read a ZIP `Entry` from the receiver and forward its contents to a `Consumer` closure. - /// - /// - Parameters: - /// - entry: The ZIP `Entry` to read. - /// - bufferSize: The maximum size of the read buffer and the decompression buffer (if needed). - /// - skipCRC32: Optional flag to skip calculation of the CRC32 checksum to improve performance. - /// - progress: A progress object that can be used to track or cancel the extract operation. - /// - consumer: A closure that consumes contents of `Entry` as `Data` chunks. - /// - Returns: The checksum of the processed content or 0 if the `skipCRC32` flag was set to `true`.. - /// - Throws: An error if the destination file cannot be written or the entry contains malformed content. - func extract( - _ entry: Entry, - bufferSize: Int = defaultReadChunkSize, - skipCRC32: Bool = false, - progress: Progress? = nil, - consumer: Consumer) - throws -> CRC32 - { - guard bufferSize > 0 else { - throw ArchiveError.invalidBufferSize - } - var checksum = CRC32(0) - let localFileHeader = entry.localFileHeader - guard entry.dataOffset <= .max else { throw ArchiveError.invalidLocalHeaderDataOffset } - fseeko(archiveFile, off_t(entry.dataOffset), SEEK_SET) - progress?.totalUnitCount = totalUnitCountForReading(entry) - switch entry.type { - case .file: - guard let compressionMethod = CompressionMethod(rawValue: localFileHeader.compressionMethod) else { - throw ArchiveError.invalidCompressionMethod - } - switch compressionMethod { - case .none: checksum = try readUncompressed( - entry: entry, - bufferSize: bufferSize, - skipCRC32: skipCRC32, - progress: progress, - with: consumer) - case .deflate: checksum = try readCompressed( - entry: entry, - bufferSize: bufferSize, - skipCRC32: skipCRC32, - progress: progress, - with: consumer) - } - case .directory: - try consumer(Data()) - progress?.completedUnitCount = totalUnitCountForReading(entry) - case .symlink: - let localFileHeader = entry.localFileHeader - let size = Int(localFileHeader.compressedSize) - let data = try Data.readChunk(of: size, from: archiveFile) - checksum = data.crc32(checksum: 0) - try consumer(data) - progress?.completedUnitCount = totalUnitCountForReading(entry) - } - return checksum - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+ReadingDeprecated.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+ReadingDeprecated.swift deleted file mode 100644 index 1e30365..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+ReadingDeprecated.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// Archive+ReadingDeprecated.swift -// ZIPFoundation -// -// Copyright © 2017-2021 Thomas Zoechling, https://www.peakstep.com and the ZIP Foundation project authors. -// Released under the MIT License. -// -// See https://github.com/weichsel/ZIPFoundation/blob/master/LICENSE for license information. -// - -import Foundation - -extension Archive { - - @available( - *, - deprecated, - message: "Please use `Int` for `bufferSize`.") - func extract( - _ entry: Entry, - to url: URL, - bufferSize: UInt32, - skipCRC32: Bool = false, - progress: Progress? = nil) - throws -> CRC32 - { - try extract(entry, to: url, bufferSize: Int(bufferSize), skipCRC32: skipCRC32, progress: progress) - } - - @available( - *, - deprecated, - message: "Please use `Int` for `bufferSize`.") - func extract( - _ entry: Entry, - bufferSize: UInt32, - skipCRC32: Bool = false, - progress: Progress? = nil, - consumer: Consumer) - throws -> CRC32 - { - try extract( - entry, - bufferSize: Int(bufferSize), - skipCRC32: skipCRC32, - progress: progress, - consumer: consumer) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+Writing.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+Writing.swift deleted file mode 100644 index 639877a..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+Writing.swift +++ /dev/null @@ -1,385 +0,0 @@ -// -// Archive+Writing.swift -// ZIPFoundation -// -// Copyright © 2017-2021 Thomas Zoechling, https://www.peakstep.com and the ZIP Foundation project authors. -// Released under the MIT License. -// -// See https://github.com/weichsel/ZIPFoundation/blob/master/LICENSE for license information. -// - -import Foundation - -extension Archive { - enum ModifyOperation: Int { - case remove = -1 - case add = 1 - } - - typealias EndOfCentralDirectoryStructure = (EndOfCentralDirectoryRecord, ZIP64EndOfCentralDirectory?) - - /// Write files, directories or symlinks to the receiver. - /// - /// - Parameters: - /// - path: The path that is used to identify an `Entry` within the `Archive` file. - /// - baseURL: The base URL of the resource to add. - /// The `baseURL` combined with `path` must form a fully qualified file URL. - /// - compressionMethod: Indicates the `CompressionMethod` that should be applied to `Entry`. - /// By default, no compression will be applied. - /// - bufferSize: The maximum size of the write buffer and the compression buffer (if needed). - /// - progress: A progress object that can be used to track or cancel the add operation. - /// - Throws: An error if the source file cannot be read or the receiver is not writable. - func addEntry( - with path: String, - relativeTo baseURL: URL, - compressionMethod: CompressionMethod = .none, - bufferSize: Int = defaultWriteChunkSize, - progress: Progress? = nil) - throws - { - let fileURL = baseURL.appendingPathComponent(path) - - try addEntry( - with: path, - fileURL: fileURL, - compressionMethod: compressionMethod, - bufferSize: bufferSize, - progress: progress) - } - - /// Write files, directories or symlinks to the receiver. - /// - /// - Parameters: - /// - path: The path that is used to identify an `Entry` within the `Archive` file. - /// - fileURL: An absolute file URL referring to the resource to add. - /// - compressionMethod: Indicates the `CompressionMethod` that should be applied to `Entry`. - /// By default, no compression will be applied. - /// - bufferSize: The maximum size of the write buffer and the compression buffer (if needed). - /// - progress: A progress object that can be used to track or cancel the add operation. - /// - Throws: An error if the source file cannot be read or the receiver is not writable. - func addEntry( - with path: String, - fileURL: URL, - compressionMethod: CompressionMethod = .none, - bufferSize: Int = defaultWriteChunkSize, - progress: Progress? = nil) - throws - { - let fileManager = FileManager() - guard fileManager.itemExists(at: fileURL) else { - throw CocoaError(.fileReadNoSuchFile, userInfo: [NSFilePathErrorKey: fileURL.path]) - } - let type = try FileManager.typeForItem(at: fileURL) - // symlinks do not need to be readable - guard type == .symlink || fileManager.isReadableFile(atPath: fileURL.path) else { - throw CocoaError(.fileReadNoPermission, userInfo: [NSFilePathErrorKey: url.path]) - } - let modDate = try FileManager.fileModificationDateTimeForItem(at: fileURL) - let uncompressedSize = type == .directory ? 0 : try FileManager.fileSizeForItem(at: fileURL) - let permissions = try FileManager.permissionsForItem(at: fileURL) - var provider: Provider - switch type { - case .file: - let entryFileSystemRepresentation = fileManager.fileSystemRepresentation(withPath: fileURL.path) - guard let entryFile: FILEPointer = fopen(entryFileSystemRepresentation, "rb") else { - throw CocoaError(.fileNoSuchFile) - } - defer { fclose(entryFile) } - provider = { _, _ in try Data.readChunk(of: bufferSize, from: entryFile) } - try addEntry( - with: path, - type: type, - uncompressedSize: uncompressedSize, - modificationDate: modDate, - permissions: permissions, - compressionMethod: compressionMethod, - bufferSize: bufferSize, - progress: progress, - provider: provider) - case .directory: - provider = { _, _ in Data() } - try addEntry( - with: path.hasSuffix("/") ? path : path + "/", - type: type, - uncompressedSize: uncompressedSize, - modificationDate: modDate, - permissions: permissions, - compressionMethod: compressionMethod, - bufferSize: bufferSize, - progress: progress, - provider: provider) - case .symlink: - provider = { _, _ -> Data in - let linkDestination = try fileManager.destinationOfSymbolicLink(atPath: fileURL.path) - let linkFileSystemRepresentation = fileManager.fileSystemRepresentation(withPath: linkDestination) - let linkLength = Int(strlen(linkFileSystemRepresentation)) - let linkBuffer = UnsafeBufferPointer(start: linkFileSystemRepresentation, count: linkLength) - return Data(buffer: linkBuffer) - } - try addEntry( - with: path, - type: type, - uncompressedSize: uncompressedSize, - modificationDate: modDate, - permissions: permissions, - compressionMethod: compressionMethod, - bufferSize: bufferSize, - progress: progress, - provider: provider) - } - } - - /// Write files, directories or symlinks to the receiver. - /// - /// - Parameters: - /// - path: The path that is used to identify an `Entry` within the `Archive` file. - /// - type: Indicates the `Entry.EntryType` of the added content. - /// - uncompressedSize: The uncompressed size of the data that is going to be added with `provider`. - /// - modificationDate: A `Date` describing the file modification date of the `Entry`. - /// Default is the current `Date`. - /// - permissions: POSIX file permissions for the `Entry`. - /// Default is `0`o`644` for files and symlinks and `0`o`755` for directories. - /// - compressionMethod: Indicates the `CompressionMethod` that should be applied to `Entry`. - /// By default, no compression will be applied. - /// - bufferSize: The maximum size of the write buffer and the compression buffer (if needed). - /// - progress: A progress object that can be used to track or cancel the add operation. - /// - provider: A closure that accepts a position and a chunk size. Returns a `Data` chunk. - /// - Throws: An error if the source data is invalid or the receiver is not writable. - func addEntry( - with path: String, - type: Entry.EntryType, - uncompressedSize: Int64, - modificationDate: Date = Date(), - permissions: UInt16? = nil, - compressionMethod: CompressionMethod = .none, - bufferSize: Int = defaultWriteChunkSize, - progress: Progress? = nil, - provider: Provider) - throws - { - guard accessMode != .read else { throw ArchiveError.unwritableArchive } - // Directories and symlinks cannot be compressed - let compressionMethod = type == .file ? compressionMethod : .none - progress?.totalUnitCount = type == .directory ? defaultDirectoryUnitCount : uncompressedSize - let (eocdRecord, zip64EOCD) = (endOfCentralDirectoryRecord, zip64EndOfCentralDirectory) - guard offsetToStartOfCentralDirectory <= .max else { throw ArchiveError.invalidCentralDirectoryOffset } - var startOfCD = Int64(offsetToStartOfCentralDirectory) - fseeko(archiveFile, off_t(startOfCD), SEEK_SET) - let existingSize = sizeOfCentralDirectory - let existingData = try Data.readChunk(of: Int(existingSize), from: archiveFile) - fseeko(archiveFile, off_t(startOfCD), SEEK_SET) - let fileHeaderStart = Int64(ftello(archiveFile)) - let modDateTime = modificationDate.fileModificationDateTime - defer { fflush(self.archiveFile) } - do { - // Local File Header - var localFileHeader = try writeLocalFileHeader( - path: path, - compressionMethod: compressionMethod, - size: (UInt64(uncompressedSize), 0), - checksum: 0, - modificationDateTime: modDateTime) - // File Data - let (written, checksum) = try writeEntry( - uncompressedSize: uncompressedSize, - type: type, - compressionMethod: compressionMethod, - bufferSize: bufferSize, - progress: progress, - provider: provider) - startOfCD = Int64(ftello(archiveFile)) - // Write the local file header a second time. Now with compressedSize (if applicable) and a valid checksum. - fseeko(archiveFile, off_t(fileHeaderStart), SEEK_SET) - localFileHeader = try writeLocalFileHeader( - path: path, - compressionMethod: compressionMethod, - size: (UInt64(uncompressedSize), UInt64(written)), - checksum: checksum, - modificationDateTime: modDateTime) - // Central Directory - fseeko(archiveFile, off_t(startOfCD), SEEK_SET) - _ = try Data.writeLargeChunk(existingData, size: existingSize, bufferSize: bufferSize, to: archiveFile) - let permissions = permissions ?? (type == .directory ? defaultDirectoryPermissions : defaultFilePermissions) - let externalAttributes = FileManager.externalFileAttributesForEntry(of: type, permissions: permissions) - let centralDir = try writeCentralDirectoryStructure( - localFileHeader: localFileHeader, - relativeOffset: UInt64(fileHeaderStart), - externalFileAttributes: externalAttributes) - // End of Central Directory Record (including ZIP64 End of Central Directory Record/Locator) - let startOfEOCD = UInt64(ftello(archiveFile)) - let eocd = try writeEndOfCentralDirectory( - centralDirectoryStructure: centralDir, - startOfCentralDirectory: UInt64(startOfCD), - startOfEndOfCentralDirectory: startOfEOCD, - operation: .add) - (endOfCentralDirectoryRecord, zip64EndOfCentralDirectory) = eocd - } catch ArchiveError.cancelledOperation { - try rollback(UInt64(fileHeaderStart), (existingData, existingSize), bufferSize, eocdRecord, zip64EOCD) - throw ArchiveError.cancelledOperation - } - } - - /// Remove a ZIP `Entry` from the receiver. - /// - /// - Parameters: - /// - entry: The `Entry` to remove. - /// - bufferSize: The maximum size for the read and write buffers used during removal. - /// - progress: A progress object that can be used to track or cancel the remove operation. - /// - Throws: An error if the `Entry` is malformed or the receiver is not writable. - func remove(_ entry: Entry, bufferSize: Int = defaultReadChunkSize, progress: Progress? = nil) throws { - guard accessMode != .read else { throw ArchiveError.unwritableArchive } - let (tempArchive, tempDir) = try makeTempArchive() - defer { tempDir.map { try? FileManager().removeItem(at: $0) } } - progress?.totalUnitCount = totalUnitCountForRemoving(entry) - var centralDirectoryData = Data() - var offset: UInt64 = 0 - for currentEntry in self { - let cds = currentEntry.centralDirectoryStructure - if currentEntry != entry { - let entryStart = cds.effectiveRelativeOffsetOfLocalHeader - fseeko(archiveFile, off_t(entryStart), SEEK_SET) - let provider: Provider = { _, chunkSize -> Data in - try Data.readChunk(of: chunkSize, from: self.archiveFile) - } - let consumer: Consumer = { - if progress?.isCancelled == true { throw ArchiveError.cancelledOperation } - _ = try Data.write(chunk: $0, to: tempArchive.archiveFile) - progress?.completedUnitCount += Int64($0.count) - } - guard currentEntry.localSize <= .max else { throw ArchiveError.invalidLocalHeaderSize } - _ = try Data.consumePart( - of: Int64(currentEntry.localSize), - chunkSize: bufferSize, - provider: provider, - consumer: consumer) - let updatedCentralDirectory = updateOffsetInCentralDirectory( - centralDirectoryStructure: cds, - updatedOffset: entryStart - offset) - centralDirectoryData.append(updatedCentralDirectory.data) - } else { offset = currentEntry.localSize } - } - let startOfCentralDirectory = UInt64(ftello(tempArchive.archiveFile)) - _ = try Data.write(chunk: centralDirectoryData, to: tempArchive.archiveFile) - let startOfEndOfCentralDirectory = UInt64(ftello(tempArchive.archiveFile)) - tempArchive.endOfCentralDirectoryRecord = endOfCentralDirectoryRecord - tempArchive.zip64EndOfCentralDirectory = zip64EndOfCentralDirectory - let ecodStructure = try - tempArchive.writeEndOfCentralDirectory( - centralDirectoryStructure: entry.centralDirectoryStructure, - startOfCentralDirectory: startOfCentralDirectory, - startOfEndOfCentralDirectory: startOfEndOfCentralDirectory, - operation: .remove) - (tempArchive.endOfCentralDirectoryRecord, tempArchive.zip64EndOfCentralDirectory) = ecodStructure - (endOfCentralDirectoryRecord, zip64EndOfCentralDirectory) = ecodStructure - fflush(tempArchive.archiveFile) - try replaceCurrentArchive(with: tempArchive) - } - - func replaceCurrentArchive(with archive: Archive) throws { - fclose(archiveFile) - if isMemoryArchive { - #if swift(>=5.0) - guard - let data = archive.data, - let config = Archive.makeBackingConfiguration(for: data, mode: .update) else - { - throw ArchiveError.unwritableArchive - } - archiveFile = config.file - memoryFile = config.memoryFile - endOfCentralDirectoryRecord = config.endOfCentralDirectoryRecord - zip64EndOfCentralDirectory = config.zip64EndOfCentralDirectory - #endif - } else { - let fileManager = FileManager() - #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) - do { - _ = try fileManager.replaceItemAt(url, withItemAt: archive.url) - } catch { - _ = try fileManager.removeItem(at: url) - _ = try fileManager.moveItem(at: archive.url, to: url) - } - #else - _ = try fileManager.removeItem(at: url) - _ = try fileManager.moveItem(at: archive.url, to: url) - #endif - let fileSystemRepresentation = fileManager.fileSystemRepresentation(withPath: url.path) - guard let file = fopen(fileSystemRepresentation, "rb+") else { throw ArchiveError.unreadableArchive } - archiveFile = file - } - } -} - -// MARK: - Private - -extension Archive { - - private func updateOffsetInCentralDirectory( - centralDirectoryStructure: CentralDirectoryStructure, - updatedOffset: UInt64) - -> CentralDirectoryStructure - { - let zip64ExtendedInformation = Entry.ZIP64ExtendedInformation( - zip64ExtendedInformation: centralDirectoryStructure.zip64ExtendedInformation, offset: updatedOffset) - let offsetInCD = updatedOffset < maxOffsetOfLocalFileHeader ? UInt32(updatedOffset) : UInt32.max - return CentralDirectoryStructure( - centralDirectoryStructure: centralDirectoryStructure, - zip64ExtendedInformation: zip64ExtendedInformation, - relativeOffset: offsetInCD) - } - - private func rollback( - _ localFileHeaderStart: UInt64, - _ existingCentralDirectory: (data: Data, size: UInt64), - _ bufferSize: Int, - _ endOfCentralDirRecord: EndOfCentralDirectoryRecord, - _ zip64EndOfCentralDirectory: ZIP64EndOfCentralDirectory?) - throws - { - fflush(archiveFile) - ftruncate(fileno(archiveFile), off_t(localFileHeaderStart)) - fseeko(archiveFile, off_t(localFileHeaderStart), SEEK_SET) - _ = try Data.writeLargeChunk( - existingCentralDirectory.data, - size: existingCentralDirectory.size, - bufferSize: bufferSize, - to: archiveFile) - _ = try Data.write(chunk: existingCentralDirectory.data, to: archiveFile) - if let zip64EOCD = zip64EndOfCentralDirectory { - _ = try Data.write(chunk: zip64EOCD.data, to: archiveFile) - } - _ = try Data.write(chunk: endOfCentralDirRecord.data, to: archiveFile) - } - - private func makeTempArchive() throws -> (Archive, URL?) { - var archive: Archive - var url: URL? - if isMemoryArchive { - #if swift(>=5.0) - guard - let tempArchive = Archive( - data: Data(), - accessMode: .create, - preferredEncoding: preferredEncoding) else - { - throw ArchiveError.unwritableArchive - } - archive = tempArchive - #else - fatalError("Memory archives are unsupported.") - #endif - } else { - let manager = FileManager() - let tempDir = URL.temporaryReplacementDirectoryURL(for: self) - let uniqueString = ProcessInfo.processInfo.globallyUniqueString - let tempArchiveURL = tempDir.appendingPathComponent(uniqueString) - try manager.createParentDirectoryStructure(for: tempArchiveURL) - guard let tempArchive = Archive(url: tempArchiveURL, accessMode: .create) else { - throw ArchiveError.unwritableArchive - } - archive = tempArchive - url = tempDir - } - return (archive, url) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+WritingDeprecated.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+WritingDeprecated.swift deleted file mode 100644 index 311c6a8..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+WritingDeprecated.swift +++ /dev/null @@ -1,91 +0,0 @@ -// -// Archive+WritingDeprecated.swift -// ZIPFoundation -// -// Copyright © 2017-2021 Thomas Zoechling, https://www.peakstep.com and the ZIP Foundation project authors. -// Released under the MIT License. -// -// See https://github.com/weichsel/ZIPFoundation/blob/master/LICENSE for license information. -// - -import Foundation - -extension Archive { - - @available( - *, - deprecated, - message: "Please use `Int` for `bufferSize`.") - func addEntry( - with path: String, - relativeTo baseURL: URL, - compressionMethod: CompressionMethod = .none, - bufferSize: UInt32, - progress: Progress? = nil) - throws - { - try addEntry( - with: path, - relativeTo: baseURL, - compressionMethod: compressionMethod, - bufferSize: Int(bufferSize), - progress: progress) - } - - @available( - *, - deprecated, - message: "Please use `Int` for `bufferSize`.") - func addEntry( - with path: String, - fileURL: URL, - compressionMethod: CompressionMethod = .none, - bufferSize: UInt32, - progress: Progress? = nil) - throws - { - try addEntry( - with: path, - fileURL: fileURL, - compressionMethod: compressionMethod, - bufferSize: Int(bufferSize), - progress: progress) - } - - @available( - *, - deprecated, - message: "Please use `Int64` for `uncompressedSize` and provider `position`. `Int` for `bufferSize`.") - func addEntry( - with path: String, - type: Entry.EntryType, - uncompressedSize: UInt32, - modificationDate: Date = Date(), - permissions: UInt16? = nil, - compressionMethod: CompressionMethod = .none, - bufferSize: Int = defaultWriteChunkSize, - progress: Progress? = nil, - provider: (_ position: Int, _ size: Int) throws -> Data) - throws - { - let newProvider: Provider = { try provider(Int($0), $1) } - try addEntry( - with: path, - type: type, - uncompressedSize: Int64(uncompressedSize), - modificationDate: modificationDate, - permissions: permissions, - compressionMethod: compressionMethod, - bufferSize: bufferSize, - progress: progress, - provider: newProvider) - } - - @available( - *, - deprecated, - message: "Please use `Int` for `bufferSize`.") - func remove(_ entry: Entry, bufferSize: UInt32, progress: Progress? = nil) throws { - try remove(entry, bufferSize: Int(bufferSize), progress: progress) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+ZIP64.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+ZIP64.swift deleted file mode 100644 index 2b301f7..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive+ZIP64.swift +++ /dev/null @@ -1,170 +0,0 @@ -// -// Archive+ZIP64.swift -// ZIPFoundation -// -// Copyright © 2017-2021 Thomas Zoechling, https://www.peakstep.com and the ZIP Foundation project authors. -// Released under the MIT License. -// -// See https://github.com/weichsel/ZIPFoundation/blob/master/LICENSE for license information. -// - -import Foundation - -let zip64EOCDRecordStructSignature = 0x06064b50 -let zip64EOCDLocatorStructSignature = 0x07064b50 - -// MARK: - ExtraFieldHeaderID - -enum ExtraFieldHeaderID: UInt16 { - case zip64ExtendedInformation = 0x0001 -} - -extension Archive { - struct ZIP64EndOfCentralDirectory { - let record: ZIP64EndOfCentralDirectoryRecord - let locator: ZIP64EndOfCentralDirectoryLocator - } - - struct ZIP64EndOfCentralDirectoryRecord: DataSerializable { - let zip64EOCDRecordSignature = UInt32(zip64EOCDRecordStructSignature) - let sizeOfZIP64EndOfCentralDirectoryRecord: UInt64 - let versionMadeBy: UInt16 - let versionNeededToExtract: UInt16 - let numberOfDisk: UInt32 - let numberOfDiskStart: UInt32 - let totalNumberOfEntriesOnDisk: UInt64 - let totalNumberOfEntriesInCentralDirectory: UInt64 - let sizeOfCentralDirectory: UInt64 - let offsetToStartOfCentralDirectory: UInt64 - let zip64ExtensibleDataSector: Data - static let size = 56 - } - - struct ZIP64EndOfCentralDirectoryLocator: DataSerializable { - let zip64EOCDLocatorSignature = UInt32(zip64EOCDLocatorStructSignature) - let numberOfDiskWithZIP64EOCDRecordStart: UInt32 - let relativeOffsetOfZIP64EOCDRecord: UInt64 - let totalNumberOfDisk: UInt32 - static let size = 20 - } -} - -extension Archive.ZIP64EndOfCentralDirectoryRecord { - - // MARK: Lifecycle - - init?(data: Data, additionalDataProvider _: (Int) throws -> Data) { - guard data.count == Archive.ZIP64EndOfCentralDirectoryRecord.size else { return nil } - guard data.scanValue(start: 0) == zip64EOCDRecordSignature else { return nil } - sizeOfZIP64EndOfCentralDirectoryRecord = data.scanValue(start: 4) - versionMadeBy = data.scanValue(start: 12) - versionNeededToExtract = data.scanValue(start: 14) - // Version Needed to Extract: 4.5 - File uses ZIP64 format extensions - guard versionNeededToExtract >= Archive.Version.v45.rawValue else { return nil } - numberOfDisk = data.scanValue(start: 16) - numberOfDiskStart = data.scanValue(start: 20) - totalNumberOfEntriesOnDisk = data.scanValue(start: 24) - totalNumberOfEntriesInCentralDirectory = data.scanValue(start: 32) - sizeOfCentralDirectory = data.scanValue(start: 40) - offsetToStartOfCentralDirectory = data.scanValue(start: 48) - zip64ExtensibleDataSector = Data() - } - - init( - record: Archive.ZIP64EndOfCentralDirectoryRecord, - numberOfEntriesOnDisk: UInt64, - numberOfEntriesInCD: UInt64, - sizeOfCentralDirectory: UInt64, - offsetToStartOfCD: UInt64) - { - sizeOfZIP64EndOfCentralDirectoryRecord = record.sizeOfZIP64EndOfCentralDirectoryRecord - versionMadeBy = record.versionMadeBy - versionNeededToExtract = record.versionNeededToExtract - numberOfDisk = record.numberOfDisk - numberOfDiskStart = record.numberOfDiskStart - totalNumberOfEntriesOnDisk = numberOfEntriesOnDisk - totalNumberOfEntriesInCentralDirectory = numberOfEntriesInCD - self.sizeOfCentralDirectory = sizeOfCentralDirectory - offsetToStartOfCentralDirectory = offsetToStartOfCD - zip64ExtensibleDataSector = record.zip64ExtensibleDataSector - } - - // MARK: Internal - - var data: Data { - var zip64EOCDRecordSignature = zip64EOCDRecordSignature - var sizeOfZIP64EOCDRecord = sizeOfZIP64EndOfCentralDirectoryRecord - var versionMadeBy = versionMadeBy - var versionNeededToExtract = versionNeededToExtract - var numberOfDisk = numberOfDisk - var numberOfDiskStart = numberOfDiskStart - var totalNumberOfEntriesOnDisk = totalNumberOfEntriesOnDisk - var totalNumberOfEntriesInCD = totalNumberOfEntriesInCentralDirectory - var sizeOfCD = sizeOfCentralDirectory - var offsetToStartOfCD = offsetToStartOfCentralDirectory - var data = Data() - withUnsafePointer(to: &zip64EOCDRecordSignature) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &sizeOfZIP64EOCDRecord) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &versionMadeBy) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &versionNeededToExtract) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &numberOfDisk) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &numberOfDiskStart) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &totalNumberOfEntriesOnDisk) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &totalNumberOfEntriesInCD) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &sizeOfCD) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &offsetToStartOfCD) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - data.append(zip64ExtensibleDataSector) - return data - } - -} - -extension Archive.ZIP64EndOfCentralDirectoryLocator { - - // MARK: Lifecycle - - init?(data: Data, additionalDataProvider _: (Int) throws -> Data) { - guard data.count == Archive.ZIP64EndOfCentralDirectoryLocator.size else { return nil } - guard data.scanValue(start: 0) == zip64EOCDLocatorSignature else { return nil } - numberOfDiskWithZIP64EOCDRecordStart = data.scanValue(start: 4) - relativeOffsetOfZIP64EOCDRecord = data.scanValue(start: 8) - totalNumberOfDisk = data.scanValue(start: 16) - } - - init(locator: Archive.ZIP64EndOfCentralDirectoryLocator, offsetOfZIP64EOCDRecord: UInt64) { - numberOfDiskWithZIP64EOCDRecordStart = locator.numberOfDiskWithZIP64EOCDRecordStart - relativeOffsetOfZIP64EOCDRecord = offsetOfZIP64EOCDRecord - totalNumberOfDisk = locator.totalNumberOfDisk - } - - // MARK: Internal - - var data: Data { - var zip64EOCDLocatorSignature = zip64EOCDLocatorSignature - var numberOfDiskWithZIP64EOCD = numberOfDiskWithZIP64EOCDRecordStart - var offsetOfZIP64EOCDRecord = relativeOffsetOfZIP64EOCDRecord - var totalNumberOfDisk = totalNumberOfDisk - var data = Data() - withUnsafePointer(to: &zip64EOCDLocatorSignature) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &numberOfDiskWithZIP64EOCD) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &offsetOfZIP64EOCDRecord) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &totalNumberOfDisk) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - return data - } - -} - -extension Archive.ZIP64EndOfCentralDirectory { - var data: Data { record.data + locator.data } -} - -/// Properties that represent the maximum value of each field -var maxUInt32 = UInt32.max -var maxUInt16 = UInt16.max - -var maxCompressedSize: UInt32 { maxUInt32 } -var maxUncompressedSize: UInt32 { maxUInt32 } -var maxOffsetOfLocalFileHeader: UInt32 { maxUInt32 } -var maxOffsetOfCentralDirectory: UInt32 { maxUInt32 } -var maxSizeOfCentralDirectory: UInt32 { maxUInt32 } -var maxTotalNumberOfEntries: UInt16 { maxUInt16 } diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive.swift deleted file mode 100644 index 497791d..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Archive.swift +++ /dev/null @@ -1,397 +0,0 @@ -// -// Archive.swift -// ZIPFoundation -// -// Copyright © 2017-2021 Thomas Zoechling, https://www.peakstep.com and the ZIP Foundation project authors. -// Released under the MIT License. -// -// See https://github.com/weichsel/ZIPFoundation/blob/master/LICENSE for license information. -// - -import Foundation - -/// The default chunk size when reading entry data from an archive. -let defaultReadChunkSize = Int(16 * 1024) -/// The default chunk size when writing entry data to an archive. -let defaultWriteChunkSize = defaultReadChunkSize -/// The default permissions for newly added entries. -let defaultFilePermissions = UInt16(0o644) -/// The default permissions for newly added directories. -let defaultDirectoryPermissions = UInt16(0o755) -let defaultPOSIXBufferSize = defaultReadChunkSize -let defaultDirectoryUnitCount = Int64(1) -let minEndOfCentralDirectoryOffset = Int64(22) -let endOfCentralDirectoryStructSignature = 0x06054b50 -let localFileHeaderStructSignature = 0x04034b50 -let dataDescriptorStructSignature = 0x08074b50 -let centralDirectoryStructSignature = 0x02014b50 -let memoryURLScheme = "memory" - -// MARK: - Archive - -/// A sequence of uncompressed or compressed ZIP entries. -/// -/// You use an `Archive` to create, read or update ZIP files. -/// To read an existing ZIP file, you have to pass in an existing file `URL` and `AccessMode.read`: -/// -/// var archiveURL = URL(fileURLWithPath: "/path/file.zip") -/// var archive = Archive(url: archiveURL, accessMode: .read) -/// -/// An `Archive` is a sequence of entries. You can -/// iterate over an archive using a `for`-`in` loop to get access to individual `Entry` objects: -/// -/// for entry in archive { -/// print(entry.path) -/// } -/// -/// Each `Entry` in an `Archive` is represented by its `path`. You can -/// use `path` to retrieve the corresponding `Entry` from an `Archive` via subscripting: -/// -/// let entry = archive['/path/file.txt'] -/// -/// To create a new `Archive`, pass in a non-existing file URL and `AccessMode.create`. To modify an -/// existing `Archive` use `AccessMode.update`: -/// -/// var archiveURL = URL(fileURLWithPath: "/path/file.zip") -/// var archive = Archive(url: archiveURL, accessMode: .update) -/// try archive?.addEntry("test.txt", relativeTo: baseURL, compressionMethod: .deflate) -final class Archive: Sequence { - - // MARK: Lifecycle - - /// Initializes a new ZIP `Archive`. - /// - /// You can use this initalizer to create new archive files or to read and update existing ones. - /// The `mode` parameter indicates the intended usage of the archive: `.read`, `.create` or `.update`. - /// - Parameters: - /// - url: File URL to the receivers backing file. - /// - mode: Access mode of the receiver. - /// - preferredEncoding: Encoding for entry paths. Overrides the encoding specified in the archive. - /// This encoding is only used when _decoding_ paths from the receiver. - /// Paths of entries added with `addEntry` are always UTF-8 encoded. - /// - Returns: An archive initialized with a backing file at the passed in file URL and the given access mode - /// or `nil` if the following criteria are not met: - /// - Note: - /// - The file URL _must_ point to an existing file for `AccessMode.read`. - /// - The file URL _must_ point to a non-existing file for `AccessMode.create`. - /// - The file URL _must_ point to an existing file for `AccessMode.update`. - init?(url: URL, accessMode mode: AccessMode, preferredEncoding: String.Encoding? = nil) { - self.url = url - accessMode = mode - self.preferredEncoding = preferredEncoding - guard let config = Archive.makeBackingConfiguration(for: url, mode: mode) else { - return nil - } - archiveFile = config.file - endOfCentralDirectoryRecord = config.endOfCentralDirectoryRecord - zip64EndOfCentralDirectory = config.zip64EndOfCentralDirectory - setvbuf(archiveFile, nil, _IOFBF, Int(defaultPOSIXBufferSize)) - } - - deinit { - fclose(self.archiveFile) - } - - // MARK: Internal - - typealias LocalFileHeader = Entry.LocalFileHeader - typealias DataDescriptor = Entry.DefaultDataDescriptor - typealias ZIP64DataDescriptor = Entry.ZIP64DataDescriptor - typealias CentralDirectoryStructure = Entry.CentralDirectoryStructure - - /// An error that occurs during reading, creating or updating a ZIP file. - enum ArchiveError: Error { - /// Thrown when an archive file is either damaged or inaccessible. - case unreadableArchive - /// Thrown when an archive is either opened with AccessMode.read or the destination file is unwritable. - case unwritableArchive - /// Thrown when the path of an `Entry` cannot be stored in an archive. - case invalidEntryPath - /// Thrown when an `Entry` can't be stored in the archive with the proposed compression method. - case invalidCompressionMethod - /// Thrown when the stored checksum of an `Entry` doesn't match the checksum during reading. - case invalidCRC32 - /// Thrown when an extract, add or remove operation was canceled. - case cancelledOperation - /// Thrown when an extract operation was called with zero or negative `bufferSize` parameter. - case invalidBufferSize - /// Thrown when uncompressedSize/compressedSize exceeds `Int64.max` (Imposed by file API). - case invalidEntrySize - /// Thrown when the offset of local header data exceeds `Int64.max` (Imposed by file API). - case invalidLocalHeaderDataOffset - /// Thrown when the size of local header exceeds `Int64.max` (Imposed by file API). - case invalidLocalHeaderSize - /// Thrown when the offset of central directory exceeds `Int64.max` (Imposed by file API). - case invalidCentralDirectoryOffset - /// Thrown when the size of central directory exceeds `UInt64.max` (Imposed by ZIP specification). - case invalidCentralDirectorySize - /// Thrown when number of entries in central directory exceeds `UInt64.max` (Imposed by ZIP specification). - case invalidCentralDirectoryEntryCount - /// Thrown when an archive does not contain the required End of Central Directory Record. - case missingEndOfCentralDirectoryRecord - } - - /// The access mode for an `Archive`. - enum AccessMode: UInt { - /// Indicates that a newly instantiated `Archive` should create its backing file. - case create - /// Indicates that a newly instantiated `Archive` should read from an existing backing file. - case read - /// Indicates that a newly instantiated `Archive` should update an existing backing file. - case update - } - - /// The version of an `Archive` - enum Version: UInt16 { - /// The minimum version for deflate compressed archives - case v20 = 20 - /// The minimum version for archives making use of ZIP64 extensions - case v45 = 45 - } - - struct EndOfCentralDirectoryRecord: DataSerializable { - let endOfCentralDirectorySignature = UInt32(endOfCentralDirectoryStructSignature) - let numberOfDisk: UInt16 - let numberOfDiskStart: UInt16 - let totalNumberOfEntriesOnDisk: UInt16 - let totalNumberOfEntriesInCentralDirectory: UInt16 - let sizeOfCentralDirectory: UInt32 - let offsetToStartOfCentralDirectory: UInt32 - let zipFileCommentLength: UInt16 - let zipFileCommentData: Data - static let size = 22 - } - - /// URL of an Archive's backing file. - let url: URL - /// Access mode for an archive file. - let accessMode: AccessMode - var archiveFile: FILEPointer - var endOfCentralDirectoryRecord: EndOfCentralDirectoryRecord - var zip64EndOfCentralDirectory: ZIP64EndOfCentralDirectory? - var preferredEncoding: String.Encoding? - - var totalNumberOfEntriesInCentralDirectory: UInt64 { - zip64EndOfCentralDirectory?.record.totalNumberOfEntriesInCentralDirectory - ?? UInt64(endOfCentralDirectoryRecord.totalNumberOfEntriesInCentralDirectory) - } - - var sizeOfCentralDirectory: UInt64 { - zip64EndOfCentralDirectory?.record.sizeOfCentralDirectory - ?? UInt64(endOfCentralDirectoryRecord.sizeOfCentralDirectory) - } - - var offsetToStartOfCentralDirectory: UInt64 { - zip64EndOfCentralDirectory?.record.offsetToStartOfCentralDirectory - ?? UInt64(endOfCentralDirectoryRecord.offsetToStartOfCentralDirectory) - } - - #if swift(>=5.0) - var memoryFile: MemoryFile? - - /// Initializes a new in-memory ZIP `Archive`. - /// - /// You can use this initalizer to create new in-memory archive files or to read and update existing ones. - /// - /// - Parameters: - /// - data: `Data` object used as backing for in-memory archives. - /// - mode: Access mode of the receiver. - /// - preferredEncoding: Encoding for entry paths. Overrides the encoding specified in the archive. - /// This encoding is only used when _decoding_ paths from the receiver. - /// Paths of entries added with `addEntry` are always UTF-8 encoded. - /// - Returns: An in-memory archive initialized with passed in backing data. - /// - Note: - /// - The backing `data` _must_ contain a valid ZIP archive for `AccessMode.read` and `AccessMode.update`. - /// - The backing `data` _must_ be empty (or omitted) for `AccessMode.create`. - init?(data: Data = Data(), accessMode mode: AccessMode, preferredEncoding: String.Encoding? = nil) { - guard - let url = URL(string: "\(memoryURLScheme)://"), - let config = Archive.makeBackingConfiguration(for: data, mode: mode) else - { - return nil - } - - self.url = url - accessMode = mode - self.preferredEncoding = preferredEncoding - archiveFile = config.file - memoryFile = config.memoryFile - endOfCentralDirectoryRecord = config.endOfCentralDirectoryRecord - zip64EndOfCentralDirectory = config.zip64EndOfCentralDirectory - } - #endif - - // MARK: - Helpers - - static func scanForEndOfCentralDirectoryRecord(in file: FILEPointer) - -> EndOfCentralDirectoryStructure? - { - var eocdOffset: UInt64 = 0 - var index = minEndOfCentralDirectoryOffset - fseeko(file, 0, SEEK_END) - let archiveLength = Int64(ftello(file)) - while eocdOffset == 0, index <= archiveLength { - fseeko(file, off_t(archiveLength - index), SEEK_SET) - var potentialDirectoryEndTag = UInt32() - fread(&potentialDirectoryEndTag, 1, MemoryLayout.size, file) - if potentialDirectoryEndTag == UInt32(endOfCentralDirectoryStructSignature) { - eocdOffset = UInt64(archiveLength - index) - guard let eocd: EndOfCentralDirectoryRecord = Data.readStruct(from: file, at: eocdOffset) else { - return nil - } - let zip64EOCD = scanForZIP64EndOfCentralDirectory(in: file, eocdOffset: eocdOffset) - return (eocd, zip64EOCD) - } - index += 1 - } - return nil - } - - func makeIterator() -> AnyIterator { - let totalNumberOfEntriesInCD = totalNumberOfEntriesInCentralDirectory - var directoryIndex = offsetToStartOfCentralDirectory - var index = 0 - return AnyIterator { - guard index < totalNumberOfEntriesInCD else { return nil } - guard - let centralDirStruct: CentralDirectoryStructure = Data.readStruct( - from: self.archiveFile, - at: directoryIndex) else - { - return nil - } - let offset = UInt64(centralDirStruct.effectiveRelativeOffsetOfLocalHeader) - guard - let localFileHeader: LocalFileHeader = Data.readStruct( - from: self.archiveFile, - at: offset) else { return nil } - var dataDescriptor: DataDescriptor? - var zip64DataDescriptor: ZIP64DataDescriptor? - if centralDirStruct.usesDataDescriptor { - let additionalSize = UInt64(localFileHeader.fileNameLength) + UInt64(localFileHeader.extraFieldLength) - let isCompressed = centralDirStruct.compressionMethod != CompressionMethod.none.rawValue - let dataSize = isCompressed - ? centralDirStruct.effectiveCompressedSize - : centralDirStruct.effectiveUncompressedSize - let descriptorPosition = offset + UInt64(LocalFileHeader.size) + additionalSize + dataSize - if centralDirStruct.isZIP64 { - zip64DataDescriptor = Data.readStruct(from: self.archiveFile, at: descriptorPosition) - } else { - dataDescriptor = Data.readStruct(from: self.archiveFile, at: descriptorPosition) - } - } - defer { - directoryIndex += UInt64(CentralDirectoryStructure.size) - directoryIndex += UInt64(centralDirStruct.fileNameLength) - directoryIndex += UInt64(centralDirStruct.extraFieldLength) - directoryIndex += UInt64(centralDirStruct.fileCommentLength) - index += 1 - } - return Entry( - centralDirectoryStructure: centralDirStruct, - localFileHeader: localFileHeader, - dataDescriptor: dataDescriptor, - zip64DataDescriptor: zip64DataDescriptor) - } - } - - /// Retrieve the ZIP `Entry` with the given `path` from the receiver. - /// - /// - Note: The ZIP file format specification does not enforce unique paths for entries. - /// Therefore an archive can contain multiple entries with the same path. This method - /// always returns the first `Entry` with the given `path`. - /// - /// - Parameter path: A relative file path identifying the corresponding `Entry`. - /// - Returns: An `Entry` with the given `path`. Otherwise, `nil`. - subscript(path: String) -> Entry? { - if let encoding = preferredEncoding { - return first { $0.path(using: encoding) == path } - } - return first { $0.path == path } - } - - // MARK: Private - - private static func scanForZIP64EndOfCentralDirectory(in file: FILEPointer, eocdOffset: UInt64) - -> ZIP64EndOfCentralDirectory? - { - guard UInt64(ZIP64EndOfCentralDirectoryLocator.size) < eocdOffset else { - return nil - } - let locatorOffset = eocdOffset - UInt64(ZIP64EndOfCentralDirectoryLocator.size) - - guard UInt64(ZIP64EndOfCentralDirectoryRecord.size) < locatorOffset else { - return nil - } - let recordOffset = locatorOffset - UInt64(ZIP64EndOfCentralDirectoryRecord.size) - guard - let locator: ZIP64EndOfCentralDirectoryLocator = Data.readStruct(from: file, at: locatorOffset), - let record: ZIP64EndOfCentralDirectoryRecord = Data.readStruct(from: file, at: recordOffset) else - { - return nil - } - return ZIP64EndOfCentralDirectory(record: record, locator: locator) - } -} - -extension Archive.EndOfCentralDirectoryRecord { - - // MARK: Lifecycle - - init?(data: Data, additionalDataProvider provider: (Int) throws -> Data) { - guard data.count == Archive.EndOfCentralDirectoryRecord.size else { return nil } - guard data.scanValue(start: 0) == endOfCentralDirectorySignature else { return nil } - numberOfDisk = data.scanValue(start: 4) - numberOfDiskStart = data.scanValue(start: 6) - totalNumberOfEntriesOnDisk = data.scanValue(start: 8) - totalNumberOfEntriesInCentralDirectory = data.scanValue(start: 10) - sizeOfCentralDirectory = data.scanValue(start: 12) - offsetToStartOfCentralDirectory = data.scanValue(start: 16) - zipFileCommentLength = data.scanValue(start: 20) - guard let commentData = try? provider(Int(zipFileCommentLength)) else { return nil } - guard commentData.count == Int(zipFileCommentLength) else { return nil } - zipFileCommentData = commentData - } - - init( - record: Archive.EndOfCentralDirectoryRecord, - numberOfEntriesOnDisk: UInt16, - numberOfEntriesInCentralDirectory: UInt16, - updatedSizeOfCentralDirectory: UInt32, - startOfCentralDirectory: UInt32) - { - numberOfDisk = record.numberOfDisk - numberOfDiskStart = record.numberOfDiskStart - totalNumberOfEntriesOnDisk = numberOfEntriesOnDisk - totalNumberOfEntriesInCentralDirectory = numberOfEntriesInCentralDirectory - sizeOfCentralDirectory = updatedSizeOfCentralDirectory - offsetToStartOfCentralDirectory = startOfCentralDirectory - zipFileCommentLength = record.zipFileCommentLength - zipFileCommentData = record.zipFileCommentData - } - - // MARK: Internal - - var data: Data { - var endOfCDSignature = endOfCentralDirectorySignature - var numberOfDisk = numberOfDisk - var numberOfDiskStart = numberOfDiskStart - var totalNumberOfEntriesOnDisk = totalNumberOfEntriesOnDisk - var totalNumberOfEntriesInCD = totalNumberOfEntriesInCentralDirectory - var sizeOfCentralDirectory = sizeOfCentralDirectory - var offsetToStartOfCD = offsetToStartOfCentralDirectory - var zipFileCommentLength = zipFileCommentLength - var data = Data() - withUnsafePointer(to: &endOfCDSignature) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &numberOfDisk) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &numberOfDiskStart) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &totalNumberOfEntriesOnDisk) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &totalNumberOfEntriesInCD) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &sizeOfCentralDirectory) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &offsetToStartOfCD) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &zipFileCommentLength) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - data.append(zipFileCommentData) - return data - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Data+Compression.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Data+Compression.swift deleted file mode 100644 index 082e742..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Data+Compression.swift +++ /dev/null @@ -1,403 +0,0 @@ -// -// Data+Compression.swift -// ZIPFoundation -// -// Copyright © 2017-2021 Thomas Zoechling, https://www.peakstep.com and the ZIP Foundation project authors. -// Released under the MIT License. -// -// See https://github.com/weichsel/ZIPFoundation/blob/master/LICENSE for license information. -// - -import Foundation - -#if canImport(zlib) -import zlib -#endif - -// MARK: - CompressionMethod - -/// The compression method of an `Entry` in a ZIP `Archive`. -enum CompressionMethod: UInt16 { - /// Indicates that an `Entry` has no compression applied to its contents. - case none = 0 - /// Indicates that contents of an `Entry` have been compressed with a zlib compatible Deflate algorithm. - case deflate = 8 -} - -/// An unsigned 32-Bit Integer representing a checksum. -typealias CRC32 = UInt32 -/// A custom handler that consumes a `Data` object containing partial entry data. -/// - Parameters: -/// - data: A chunk of `Data` to consume. -/// - Throws: Can throw to indicate errors during data consumption. -typealias Consumer = (_ data: Data) throws -> Void -/// A custom handler that receives a position and a size that can be used to provide data from an arbitrary source. -/// - Parameters: -/// - position: The current read position. -/// - size: The size of the chunk to provide. -/// - Returns: A chunk of `Data`. -/// - Throws: Can throw to indicate errors in the data source. -typealias Provider = (_ position: Int64, _ size: Int) throws -> Data - -extension Data { - enum CompressionError: Error { - case invalidStream - case corruptedData - } - - /// Compress the output of `provider` and pass it to `consumer`. - /// - Parameters: - /// - size: The uncompressed size of the data to be compressed. - /// - bufferSize: The maximum size of the compression buffer. - /// - provider: A closure that accepts a position and a chunk size. Returns a `Data` chunk. - /// - consumer: A closure that processes the result of the compress operation. - /// - Returns: The checksum of the processed content. - static func compress(size: Int64, bufferSize: Int, provider: Provider, consumer: Consumer) throws -> CRC32 { - #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) - return try process( - operation: COMPRESSION_STREAM_ENCODE, - size: size, - bufferSize: bufferSize, - provider: provider, - consumer: consumer) - #else - return try encode(size: size, bufferSize: bufferSize, provider: provider, consumer: consumer) - #endif - } - - /// Decompress the output of `provider` and pass it to `consumer`. - /// - Parameters: - /// - size: The compressed size of the data to be decompressed. - /// - bufferSize: The maximum size of the decompression buffer. - /// - skipCRC32: Optional flag to skip calculation of the CRC32 checksum to improve performance. - /// - provider: A closure that accepts a position and a chunk size. Returns a `Data` chunk. - /// - consumer: A closure that processes the result of the decompress operation. - /// - Returns: The checksum of the processed content. - static func decompress( - size: Int64, - bufferSize: Int, - skipCRC32: Bool, - provider: Provider, - consumer: Consumer) - throws -> CRC32 - { - #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) - return try process( - operation: COMPRESSION_STREAM_DECODE, - size: size, - bufferSize: bufferSize, - skipCRC32: skipCRC32, - provider: provider, - consumer: consumer) - #else - return try decode(bufferSize: bufferSize, skipCRC32: skipCRC32, provider: provider, consumer: consumer) - #endif - } - - /// Calculate the `CRC32` checksum of the receiver. - /// - /// - Parameter checksum: The starting seed. - /// - Returns: The checksum calculated from the bytes of the receiver and the starting seed. - func crc32(checksum: CRC32) -> CRC32 { - #if canImport(zlib) - return withUnsafeBytes { bufferPointer in - let length = UInt32(count) - return CRC32(zlib.crc32(UInt(checksum), bufferPointer.bindMemory(to: UInt8.self).baseAddress, length)) - } - #else - return builtInCRC32(checksum: checksum) - #endif - } - -} - -// MARK: - Apple Platforms - -#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) -import Compression - -extension Data { - - static func process( - operation: compression_stream_operation, - size: Int64, - bufferSize: Int, - skipCRC32: Bool = false, - provider: Provider, - consumer: Consumer) - throws -> CRC32 - { - var crc32 = CRC32(0) - let destPointer = UnsafeMutablePointer.allocate(capacity: bufferSize) - defer { destPointer.deallocate() } - let streamPointer = UnsafeMutablePointer.allocate(capacity: 1) - defer { streamPointer.deallocate() } - var stream = streamPointer.pointee - var status = compression_stream_init(&stream, operation, COMPRESSION_ZLIB) - guard status != COMPRESSION_STATUS_ERROR else { throw CompressionError.invalidStream } - defer { compression_stream_destroy(&stream) } - stream.src_size = 0 - stream.dst_ptr = destPointer - stream.dst_size = bufferSize - var position: Int64 = 0 - var sourceData: Data? - repeat { - let isExhausted = stream.src_size == 0 - if isExhausted { - do { - sourceData = try provider(position, Int(Swift.min(size - position, Int64(bufferSize)))) - position += Int64(stream.prepare(for: sourceData)) - } catch { throw error } - } - if let sourceData = sourceData { - sourceData.withUnsafeBytes { rawBufferPointer in - if let baseAddress = rawBufferPointer.baseAddress { - let pointer = baseAddress.assumingMemoryBound(to: UInt8.self) - stream.src_ptr = pointer.advanced(by: sourceData.count - stream.src_size) - let flags = sourceData.count < bufferSize ? Int32(COMPRESSION_STREAM_FINALIZE.rawValue) : 0 - status = compression_stream_process(&stream, flags) - } - } - if - operation == COMPRESSION_STREAM_ENCODE, - isExhausted, skipCRC32 == false { crc32 = sourceData.crc32(checksum: crc32) } - } - switch status { - case COMPRESSION_STATUS_OK, COMPRESSION_STATUS_END: - let outputData = Data(bytesNoCopy: destPointer, count: bufferSize - stream.dst_size, deallocator: .none) - try consumer(outputData) - if operation == COMPRESSION_STREAM_DECODE, !skipCRC32 { crc32 = outputData.crc32(checksum: crc32) } - stream.dst_ptr = destPointer - stream.dst_size = bufferSize - default: throw CompressionError.corruptedData - } - } while status == COMPRESSION_STATUS_OK - return crc32 - } -} - -extension compression_stream { - - fileprivate mutating func prepare(for sourceData: Data?) -> Int { - guard let sourceData = sourceData else { return 0 } - - src_size = sourceData.count - return sourceData.count - } -} - -// MARK: - Linux - -#else -import CZlib - -extension Data { - static func encode(size: Int64, bufferSize: Int, provider: Provider, consumer: Consumer) throws -> CRC32 { - var stream = z_stream() - let streamSize = Int32(MemoryLayout.size) - var result = deflateInit2_( - &stream, - Z_DEFAULT_COMPRESSION, - Z_DEFLATED, - -MAX_WBITS, - 9, - Z_DEFAULT_STRATEGY, - ZLIB_VERSION, - streamSize) - defer { deflateEnd(&stream) } - guard result == Z_OK else { throw CompressionError.invalidStream } - var flush = Z_NO_FLUSH - var position: Int64 = 0 - var zipCRC32 = CRC32(0) - repeat { - let readSize = Int(Swift.min(size - position, Int64(bufferSize))) - var inputChunk = try provider(position, readSize) - zipCRC32 = inputChunk.crc32(checksum: zipCRC32) - stream.avail_in = UInt32(inputChunk.count) - try inputChunk.withUnsafeMutableBytes { rawBufferPointer in - if let baseAddress = rawBufferPointer.baseAddress { - let pointer = baseAddress.assumingMemoryBound(to: UInt8.self) - stream.next_in = pointer - flush = position + Int64(bufferSize) >= size ? Z_FINISH : Z_NO_FLUSH - } else if rawBufferPointer.count > 0 { - throw CompressionError.corruptedData - } else { - stream.next_in = nil - flush = Z_FINISH - } - var outputChunk = Data(count: bufferSize) - repeat { - stream.avail_out = UInt32(bufferSize) - try outputChunk.withUnsafeMutableBytes { rawBufferPointer in - guard let baseAddress = rawBufferPointer.baseAddress, rawBufferPointer.count > 0 else { - throw CompressionError.corruptedData - } - let pointer = baseAddress.assumingMemoryBound(to: UInt8.self) - stream.next_out = pointer - result = deflate(&stream, flush) - } - guard result >= Z_OK else { throw CompressionError.corruptedData } - - outputChunk.count = bufferSize - Int(stream.avail_out) - try consumer(outputChunk) - } while stream.avail_out == 0 - } - position += Int64(readSize) - } while flush != Z_FINISH - return zipCRC32 - } - - static func decode(bufferSize: Int, skipCRC32: Bool, provider: Provider, consumer: Consumer) throws -> CRC32 { - var stream = z_stream() - let streamSize = Int32(MemoryLayout.size) - var result = inflateInit2_(&stream, -MAX_WBITS, ZLIB_VERSION, streamSize) - defer { inflateEnd(&stream) } - guard result == Z_OK else { throw CompressionError.invalidStream } - var unzipCRC32 = CRC32(0) - var position: Int64 = 0 - repeat { - stream.avail_in = UInt32(bufferSize) - var chunk = try provider(position, bufferSize) - position += Int64(chunk.count) - try chunk.withUnsafeMutableBytes { rawBufferPointer in - if let baseAddress = rawBufferPointer.baseAddress, rawBufferPointer.count > 0 { - let pointer = baseAddress.assumingMemoryBound(to: UInt8.self) - stream.next_in = pointer - repeat { - var outputData = Data(count: bufferSize) - stream.avail_out = UInt32(bufferSize) - try outputData.withUnsafeMutableBytes { rawBufferPointer in - if let baseAddress = rawBufferPointer.baseAddress, rawBufferPointer.count > 0 { - let pointer = baseAddress.assumingMemoryBound(to: UInt8.self) - stream.next_out = pointer - } else { - throw CompressionError.corruptedData - } - result = inflate(&stream, Z_NO_FLUSH) - guard - result != Z_NEED_DICT, - result != Z_DATA_ERROR, - result != Z_MEM_ERROR else - { - throw CompressionError.corruptedData - } - } - let remainingLength = UInt32(bufferSize) - stream.avail_out - outputData.count = Int(remainingLength) - try consumer(outputData) - if !skipCRC32 { unzipCRC32 = outputData.crc32(checksum: unzipCRC32) } - } while stream.avail_out == 0 - } - } - } while result != Z_STREAM_END - return unzipCRC32 - } -} - -#endif - -/// The lookup table used to calculate `CRC32` checksums when using the built-in -/// CRC32 implementation. -private let crcTable: [CRC32] = [ - 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, - 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, - 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, - 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, - 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, - 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, - 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, - 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, - 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, - 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, - 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, - 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, - 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, - 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, - 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, - 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, - 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, - 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, - 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, - 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, - 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, - 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, - 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, - 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, - 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, - 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, - 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, - 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, - 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d, -] - -extension Data { - - /// Lookup table-based CRC32 implenetation that is used - /// if `zlib` isn't available. - /// - Parameter checksum: Running checksum or `0` for the initial run. - /// - Returns: The calculated checksum of the receiver. - func builtInCRC32(checksum: CRC32) -> CRC32 { - // The typecast is necessary on 32-bit platforms because of - // https://bugs.swift.org/browse/SR-1774 - let mask = 0xffffffff as CRC32 - var result = checksum ^ mask - #if swift(>=5.0) - crcTable.withUnsafeBufferPointer { crcTablePointer in - self.withUnsafeBytes { bufferPointer in - var bufferIndex = 0 - while bufferIndex < self.count { - let byte = bufferPointer[bufferIndex] - let index = Int((result ^ CRC32(byte)) & 0xff) - result = (result >> 8) ^ crcTablePointer[index] - bufferIndex += 1 - } - } - } - #else - withUnsafeBytes { bytes in - let bins = stride(from: 0, to: self.count, by: 256) - for bin in bins { - for binIndex in 0..<256 { - let byteIndex = bin + binIndex - guard byteIndex < self.count else { break } - - let byte = bytes[byteIndex] - let index = Int((result ^ CRC32(byte)) & 0xff) - result = (result >> 8) ^ crcTable[index] - } - } - } - #endif - return result ^ mask - } -} - -#if !swift(>=5.0) - -// Since Swift 5.0, `Data.withUnsafeBytes()` passes an `UnsafeRawBufferPointer` instead of an `UnsafePointer` -// into `body`. -// We provide a compatible method for targets that use Swift 4.x so that we can use the new version -// across all language versions. - -extension Data { - func withUnsafeBytes(_ body: (UnsafeRawBufferPointer) throws -> T) rethrows -> T { - let count = count - return try withUnsafeBytes { (pointer: UnsafePointer) throws -> T in - try body(UnsafeRawBufferPointer(start: pointer, count: count)) - } - } - - #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) - #else - mutating func withUnsafeMutableBytes(_ body: (UnsafeMutableRawBufferPointer) throws -> T) rethrows -> T { - let count = count - guard count > 0 else { - return try body(UnsafeMutableRawBufferPointer(start: nil, count: count)) - } - return try withUnsafeMutableBytes { (pointer: UnsafeMutablePointer) throws -> T in - try body(UnsafeMutableRawBufferPointer(start: pointer, count: count)) - } - } - #endif -} -#endif diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Data+CompressionDeprecated.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Data+CompressionDeprecated.swift deleted file mode 100644 index 43844b3..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Data+CompressionDeprecated.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// Data+CompressionDeprecated.swift -// ZIPFoundation -// -// Copyright © 2017-2021 Thomas Zoechling, https://www.peakstep.com and the ZIP Foundation project authors. -// Released under the MIT License. -// -// See https://github.com/weichsel/ZIPFoundation/blob/master/LICENSE for license information. -// - -import Foundation - -extension Data { - - @available(*, deprecated, message: "Please use `Int64` for `size` and provider `position`.") - static func compress( - size: Int, - bufferSize: Int, - provider: (_ position: Int, _ size: Int) throws -> Data, - consumer: Consumer) - throws -> CRC32 - { - let newProvider: Provider = { try provider(Int($0), $1) } - return try compress(size: Int64(size), bufferSize: bufferSize, provider: newProvider, consumer: consumer) - } - - @available(*, deprecated, message: "Please use `Int64` for `size` and provider `position`.") - static func decompress( - size: Int, - bufferSize: Int, - skipCRC32: Bool, - provider: (_ position: Int, _ size: Int) throws -> Data, - consumer: Consumer) - throws -> CRC32 - { - let newProvider: Provider = { try provider(Int($0), $1) } - return try decompress( - size: Int64(size), - bufferSize: bufferSize, - skipCRC32: skipCRC32, - provider: newProvider, - consumer: consumer) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Data+Serialization.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Data+Serialization.swift deleted file mode 100644 index 9447922..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Data+Serialization.swift +++ /dev/null @@ -1,149 +0,0 @@ -// -// Data+Serialization.swift -// ZIPFoundation -// -// Copyright © 2017-2021 Thomas Zoechling, https://www.peakstep.com and the ZIP Foundation project authors. -// Released under the MIT License. -// -// See https://github.com/weichsel/ZIPFoundation/blob/master/LICENSE for license information. -// - -import Foundation - -#if os(Android) -typealias FILEPointer = OpaquePointer -#else -typealias FILEPointer = UnsafeMutablePointer -#endif - -// MARK: - DataSerializable - -protocol DataSerializable { - static var size: Int { get } - init?(data: Data, additionalDataProvider: (Int) throws -> Data) - var data: Data { get } -} - -extension Data { - enum DataError: Error { - case unreadableFile - case unwritableFile - } - - static func readStruct(from file: FILEPointer, at offset: UInt64) - -> T? where T: DataSerializable - { - guard offset <= .max else { return nil } - fseeko(file, off_t(offset), SEEK_SET) - guard let data = try? readChunk(of: T.size, from: file) else { - return nil - } - let structure = T(data: data, additionalDataProvider: { additionalDataSize -> Data in - try self.readChunk(of: additionalDataSize, from: file) - }) - return structure - } - - static func consumePart( - of size: Int64, - chunkSize: Int, - skipCRC32: Bool = false, - provider: Provider, - consumer: Consumer) - throws -> CRC32 - { - var checksum = CRC32(0) - guard size > 0 else { - try consumer(Data()) - return checksum - } - - let readInOneChunk = (size < chunkSize) - var chunkSize = readInOneChunk ? Int(size) : chunkSize - var bytesRead: Int64 = 0 - while bytesRead < size { - let remainingSize = size - bytesRead - chunkSize = remainingSize < chunkSize ? Int(remainingSize) : chunkSize - let data = try provider(bytesRead, chunkSize) - try consumer(data) - if !skipCRC32 { - checksum = data.crc32(checksum: checksum) - } - bytesRead += Int64(chunkSize) - } - return checksum - } - - static func readChunk(of size: Int, from file: FILEPointer) throws -> Data { - let alignment = MemoryLayout.alignment - #if swift(>=4.1) - let bytes = UnsafeMutableRawPointer.allocate(byteCount: size, alignment: alignment) - #else - let bytes = UnsafeMutableRawPointer.allocate(bytes: size, alignedTo: alignment) - #endif - let bytesRead = fread(bytes, 1, size, file) - let error = ferror(file) - if error > 0 { - throw DataError.unreadableFile - } - #if swift(>=4.1) - return Data(bytesNoCopy: bytes, count: bytesRead, deallocator: .custom { buf, _ in buf.deallocate() }) - #else - let deallocator = Deallocator.custom { buf, _ in buf.deallocate(bytes: size, alignedTo: 1) } - return Data(bytesNoCopy: bytes, count: bytesRead, deallocator: deallocator) - #endif - } - - static func write(chunk: Data, to file: FILEPointer) throws -> Int { - var sizeWritten = 0 - chunk.withUnsafeBytes { rawBufferPointer in - if let baseAddress = rawBufferPointer.baseAddress, rawBufferPointer.count > 0 { - let pointer = baseAddress.assumingMemoryBound(to: UInt8.self) - sizeWritten = fwrite(pointer, 1, chunk.count, file) - } - } - let error = ferror(file) - if error > 0 { - throw DataError.unwritableFile - } - return sizeWritten - } - - static func writeLargeChunk( - _ chunk: Data, - size: UInt64, - bufferSize: Int, - to file: FILEPointer) - throws -> UInt64 - { - var sizeWritten: UInt64 = 0 - chunk.withUnsafeBytes { rawBufferPointer in - if let baseAddress = rawBufferPointer.baseAddress, rawBufferPointer.count > 0 { - let pointer = baseAddress.assumingMemoryBound(to: UInt8.self) - - while sizeWritten < size { - let remainingSize = size - sizeWritten - let chunkSize = Swift.min(Int(remainingSize), bufferSize) - let curPointer = pointer.advanced(by: Int(sizeWritten)) - fwrite(curPointer, 1, chunkSize, file) - sizeWritten += UInt64(chunkSize) - } - } - } - let error = ferror(file) - if error > 0 { - throw DataError.unwritableFile - } - return sizeWritten - } - - func scanValue(start: Int) -> T { - let subdata = subdata(in: start...size) - #if swift(>=5.0) - return subdata.withUnsafeBytes { $0.load(as: T.self) } - #else - return subdata.withUnsafeBytes { $0.pointee } - #endif - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Entry+Serialization.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Entry+Serialization.swift deleted file mode 100644 index 8c22c13..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Entry+Serialization.swift +++ /dev/null @@ -1,189 +0,0 @@ -// -// Entry+Serialization.swift -// ZIPFoundation -// -// Copyright © 2017-2021 Thomas Zoechling, https://www.peakstep.com and the ZIP Foundation project authors. -// Released under the MIT License. -// -// See https://github.com/weichsel/ZIPFoundation/blob/master/LICENSE for license information. -// - -import Foundation - -extension Entry.LocalFileHeader { - - // MARK: Lifecycle - - init?(data: Data, additionalDataProvider provider: (Int) throws -> Data) { - guard data.count == Entry.LocalFileHeader.size else { return nil } - guard data.scanValue(start: 0) == localFileHeaderSignature else { return nil } - versionNeededToExtract = data.scanValue(start: 4) - generalPurposeBitFlag = data.scanValue(start: 6) - compressionMethod = data.scanValue(start: 8) - lastModFileTime = data.scanValue(start: 10) - lastModFileDate = data.scanValue(start: 12) - crc32 = data.scanValue(start: 14) - compressedSize = data.scanValue(start: 18) - uncompressedSize = data.scanValue(start: 22) - fileNameLength = data.scanValue(start: 26) - extraFieldLength = data.scanValue(start: 28) - let additionalDataLength = Int(fileNameLength) + Int(extraFieldLength) - guard let additionalData = try? provider(additionalDataLength) else { return nil } - guard additionalData.count == additionalDataLength else { return nil } - var subRangeStart = 0 - var subRangeEnd = Int(fileNameLength) - fileNameData = additionalData.subdata(in: subRangeStart.. Data) { - guard data.count == Entry.CentralDirectoryStructure.size else { return nil } - guard data.scanValue(start: 0) == centralDirectorySignature else { return nil } - versionMadeBy = data.scanValue(start: 4) - versionNeededToExtract = data.scanValue(start: 6) - generalPurposeBitFlag = data.scanValue(start: 8) - compressionMethod = data.scanValue(start: 10) - lastModFileTime = data.scanValue(start: 12) - lastModFileDate = data.scanValue(start: 14) - crc32 = data.scanValue(start: 16) - compressedSize = data.scanValue(start: 20) - uncompressedSize = data.scanValue(start: 24) - fileNameLength = data.scanValue(start: 28) - extraFieldLength = data.scanValue(start: 30) - fileCommentLength = data.scanValue(start: 32) - diskNumberStart = data.scanValue(start: 34) - internalFileAttributes = data.scanValue(start: 36) - externalFileAttributes = data.scanValue(start: 38) - relativeOffsetOfLocalHeader = data.scanValue(start: 42) - let additionalDataLength = Int(fileNameLength) + Int(extraFieldLength) + Int(fileCommentLength) - guard let additionalData = try? provider(additionalDataLength) else { return nil } - guard additionalData.count == additionalDataLength else { return nil } - var subRangeStart = 0 - var subRangeEnd = Int(fileNameLength) - fileNameData = additionalData.subdata(in: subRangeStart.. Data) { - guard data.count == Self.size else { return nil } - let signature: UInt32 = data.scanValue(start: 0) - // The DataDescriptor signature is not mandatory so we have to re-arrange the input data if it is missing. - var readOffset = 0 - if signature == dataDescriptorSignature { readOffset = 4 } - crc32 = data.scanValue(start: readOffset) - readOffset += MemoryLayout.size - compressedSize = data.scanValue(start: readOffset) - readOffset += Self.memoryLengthOfSize - uncompressedSize = data.scanValue(start: readOffset) - // Our add(_ entry:) methods always maintain compressed & uncompressed - // sizes and so we don't need a data descriptor for newly added entries. - // Data descriptors of already existing entries are manually preserved - // when copying those entries to the tempArchive during remove(_ entry:). - self.data = Data() - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Entry+ZIP64.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Entry+ZIP64.swift deleted file mode 100644 index f763a21..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/Entry+ZIP64.swift +++ /dev/null @@ -1,173 +0,0 @@ -// -// Entry+ZIP64.swift -// ZIPFoundation -// -// Copyright © 2017-2021 Thomas Zoechling, https://www.peakstep.com and the ZIP Foundation project authors. -// Released under the MIT License. -// -// See https://github.com/weichsel/ZIPFoundation/blob/master/LICENSE for license information. -// - -import Foundation - -// MARK: - ExtensibleDataField - -protocol ExtensibleDataField { - var headerID: UInt16 { get } - var dataSize: UInt16 { get } -} - -extension Entry { - enum EntryError: Error { - case invalidDataError - } - - struct ZIP64ExtendedInformation: ExtensibleDataField { - let headerID: UInt16 = ExtraFieldHeaderID.zip64ExtendedInformation.rawValue - let dataSize: UInt16 - static let headerSize: UInt16 = 4 - let uncompressedSize: UInt64 - let compressedSize: UInt64 - let relativeOffsetOfLocalHeader: UInt64 - let diskNumberStart: UInt32 - } - - var zip64ExtendedInformation: ZIP64ExtendedInformation? { - centralDirectoryStructure.zip64ExtendedInformation - } -} - -typealias Field = Entry.ZIP64ExtendedInformation.Field - -extension Entry.LocalFileHeader { - var validFields: [Field] { - var fields: [Field] = [] - if uncompressedSize == .max { fields.append(.uncompressedSize) } - if compressedSize == .max { fields.append(.compressedSize) } - return fields - } -} - -extension Entry.CentralDirectoryStructure { - var validFields: [Field] { - var fields: [Field] = [] - if uncompressedSize == .max { fields.append(.uncompressedSize) } - if compressedSize == .max { fields.append(.compressedSize) } - if relativeOffsetOfLocalHeader == .max { fields.append(.relativeOffsetOfLocalHeader) } - if diskNumberStart == .max { fields.append(.diskNumberStart) } - return fields - } - - var zip64ExtendedInformation: Entry.ZIP64ExtendedInformation? { - extraFields?.compactMap { $0 as? Entry.ZIP64ExtendedInformation }.first - } -} - -extension Entry.ZIP64ExtendedInformation { - - // MARK: Lifecycle - - init?(data: Data, fields: [Field]) { - let headerLength = 4 - guard fields.reduce(0, { $0 + $1.size }) + headerLength == data.count else { return nil } - var readOffset = headerLength - func value(of field: Field) throws -> T where T: BinaryInteger { - if fields.contains(field) { - defer { - readOffset += MemoryLayout.size - } - guard readOffset + field.size <= data.count else { - throw Entry.EntryError.invalidDataError - } - return data.scanValue(start: readOffset) - } else { - return 0 - } - } - do { - dataSize = data.scanValue(start: 2) - uncompressedSize = try value(of: .uncompressedSize) - compressedSize = try value(of: .compressedSize) - relativeOffsetOfLocalHeader = try value(of: .relativeOffsetOfLocalHeader) - diskNumberStart = try value(of: .diskNumberStart) - } catch { - return nil - } - } - - init?(zip64ExtendedInformation: Entry.ZIP64ExtendedInformation?, offset: UInt64) { - // Only used when removing entry, if no ZIP64 extended information exists, - // then this information will not be newly added either - guard let existingInfo = zip64ExtendedInformation else { return nil } - relativeOffsetOfLocalHeader = offset >= maxOffsetOfLocalFileHeader ? offset : 0 - uncompressedSize = existingInfo.uncompressedSize - compressedSize = existingInfo.compressedSize - diskNumberStart = existingInfo.diskNumberStart - let tempDataSize = [relativeOffsetOfLocalHeader, uncompressedSize, compressedSize] - .filter { $0 != 0 } - .reduce(UInt16(0)) { $0 + UInt16(MemoryLayout.size(ofValue: $1)) } - dataSize = tempDataSize + (diskNumberStart > 0 ? UInt16(MemoryLayout.size(ofValue: diskNumberStart)) : 0) - if dataSize == 0 { return nil } - } - - // MARK: Internal - - enum Field { - case uncompressedSize - case compressedSize - case relativeOffsetOfLocalHeader - case diskNumberStart - - var size: Int { - switch self { - case .uncompressedSize, .compressedSize, .relativeOffsetOfLocalHeader: - return 8 - case .diskNumberStart: - return 4 - } - } - } - - var data: Data { - var headerID = headerID - var dataSize = dataSize - var uncompressedSize = uncompressedSize - var compressedSize = compressedSize - var relativeOffsetOfLFH = relativeOffsetOfLocalHeader - var diskNumberStart = diskNumberStart - var data = Data() - withUnsafePointer(to: &headerID) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &dataSize) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - if uncompressedSize != 0 || compressedSize != 0 { - withUnsafePointer(to: &uncompressedSize) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - withUnsafePointer(to: &compressedSize) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - } - if relativeOffsetOfLocalHeader != 0 { - withUnsafePointer(to: &relativeOffsetOfLFH) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - } - if diskNumberStart != 0 { - withUnsafePointer(to: &diskNumberStart) { data.append(UnsafeBufferPointer(start: $0, count: 1)) } - } - return data - } - - static func scanForZIP64Field(in data: Data, fields: [Field]) -> Entry.ZIP64ExtendedInformation? { - guard data.isEmpty == false else { return nil } - var offset = 0 - var headerID: UInt16 - var dataSize: UInt16 - let extraFieldLength = data.count - let headerSize = Int(Entry.ZIP64ExtendedInformation.headerSize) - while offset < extraFieldLength - headerSize { - headerID = data.scanValue(start: offset) - dataSize = data.scanValue(start: offset + 2) - let nextOffset = offset + headerSize + Int(dataSize) - guard nextOffset <= extraFieldLength else { return nil } - if headerID == ExtraFieldHeaderID.zip64ExtendedInformation.rawValue { - return Entry.ZIP64ExtendedInformation(data: data.subdata(in: offset..: DataSerializable { - let data: Data - let dataDescriptorSignature = UInt32(dataDescriptorStructSignature) - let crc32: UInt32 - // For normal archives, the compressed and uncompressed sizes are 4 bytes each. - // For ZIP64 format archives, the compressed and uncompressed sizes are 8 bytes each. - let compressedSize: T - let uncompressedSize: T - static var memoryLengthOfSize: Int { MemoryLayout.size } - static var size: Int { memoryLengthOfSize * 2 + 8 } - } - - typealias DefaultDataDescriptor = DataDescriptor - typealias ZIP64DataDescriptor = DataDescriptor - - struct CentralDirectoryStructure: DataSerializable { - static let size = 46 - - let centralDirectorySignature = UInt32(centralDirectoryStructSignature) - let versionMadeBy: UInt16 - let versionNeededToExtract: UInt16 - let generalPurposeBitFlag: UInt16 - let compressionMethod: UInt16 - let lastModFileTime: UInt16 - let lastModFileDate: UInt16 - let crc32: UInt32 - let compressedSize: UInt32 - let uncompressedSize: UInt32 - let fileNameLength: UInt16 - let extraFieldLength: UInt16 - let fileCommentLength: UInt16 - let diskNumberStart: UInt16 - let internalFileAttributes: UInt16 - let externalFileAttributes: UInt32 - let relativeOffsetOfLocalHeader: UInt32 - let fileNameData: Data - let extraFieldData: Data - let fileCommentData: Data - - var extraFields: [ExtensibleDataField]? - - var usesDataDescriptor: Bool { (generalPurposeBitFlag & (1 << 3)) != 0 } - var usesUTF8PathEncoding: Bool { (generalPurposeBitFlag & (1 << 11)) != 0 } - var isEncrypted: Bool { (generalPurposeBitFlag & (1 << 0)) != 0 } - var isZIP64: Bool { - // If ZIP64 extended information is existing, try to treat cd as ZIP64 format - // even if the version needed to extract is lower than 4.5 - UInt8(truncatingIfNeeded: versionNeededToExtract) >= 45 || zip64ExtendedInformation != nil - } - } - - let centralDirectoryStructure: CentralDirectoryStructure - let localFileHeader: LocalFileHeader - let dataDescriptor: DefaultDataDescriptor? - let zip64DataDescriptor: ZIP64DataDescriptor? - - /// The `path` of the receiver within a ZIP `Archive`. - var path: String { - let dosLatinUS = 0x400 - let dosLatinUSEncoding = CFStringEncoding(dosLatinUS) - let dosLatinUSStringEncoding = CFStringConvertEncodingToNSStringEncoding(dosLatinUSEncoding) - let codepage437 = String.Encoding(rawValue: dosLatinUSStringEncoding) - let encoding = centralDirectoryStructure.usesUTF8PathEncoding ? .utf8 : codepage437 - return self.path(using: encoding) - } - - /// The file attributes of the receiver as key/value pairs. - /// - /// Contains the modification date and file permissions. - var fileAttributes: [FileAttributeKey: Any] { - FileManager.attributes(from: self) - } - - /// The `CRC32` checksum of the receiver. - /// - /// - Note: Always returns `0` for entries of type `EntryType.directory`. - var checksum: CRC32 { - if centralDirectoryStructure.usesDataDescriptor { - return zip64DataDescriptor?.crc32 ?? dataDescriptor?.crc32 ?? 0 - } - return centralDirectoryStructure.crc32 - } - - /// The `EntryType` of the receiver. - var type: EntryType { - // OS Type is stored in the upper byte of versionMadeBy - let osTypeRaw = centralDirectoryStructure.versionMadeBy >> 8 - let osType = OSType(rawValue: UInt(osTypeRaw)) ?? .unused - var isDirectory = path.hasSuffix("/") - switch osType { - case .unix, .osx: - let mode = mode_t(centralDirectoryStructure.externalFileAttributes >> 16) & S_IFMT - switch mode { - case S_IFREG: - return .file - case S_IFDIR: - return .directory - case S_IFLNK: - return .symlink - default: - return isDirectory ? .directory : .file - } - case .msdos: - isDirectory = isDirectory || ((centralDirectoryStructure.externalFileAttributes >> 4) == 0x01) - fallthrough // For all other OSes we can only guess based on the directory suffix char - default: return isDirectory ? .directory : .file - } - } - - /// Indicates whether or not the receiver is compressed. - var isCompressed: Bool { - localFileHeader.compressionMethod != CompressionMethod.none.rawValue - } - - /// The size of the receiver's compressed data. - var compressedSize: UInt64 { - if centralDirectoryStructure.isZIP64 { - return zip64DataDescriptor?.compressedSize ?? centralDirectoryStructure.effectiveCompressedSize - } - return UInt64(dataDescriptor?.compressedSize ?? centralDirectoryStructure.compressedSize) - } - - /// The size of the receiver's uncompressed data. - var uncompressedSize: UInt64 { - if centralDirectoryStructure.isZIP64 { - return zip64DataDescriptor?.uncompressedSize ?? centralDirectoryStructure.effectiveUncompressedSize - } - return UInt64(dataDescriptor?.uncompressedSize ?? centralDirectoryStructure.uncompressedSize) - } - - /// The combined size of the local header, the data and the optional data descriptor. - var localSize: UInt64 { - let localFileHeader = localFileHeader - var extraDataLength = Int(localFileHeader.fileNameLength) - extraDataLength += Int(localFileHeader.extraFieldLength) - var size = UInt64(LocalFileHeader.size + extraDataLength) - size += isCompressed ? compressedSize : uncompressedSize - if centralDirectoryStructure.isZIP64 { - size += zip64DataDescriptor != nil ? UInt64(ZIP64DataDescriptor.size) : 0 - } else { - size += dataDescriptor != nil ? UInt64(DefaultDataDescriptor.size) : 0 - } - return size - } - - var dataOffset: UInt64 { - var dataOffset = centralDirectoryStructure.effectiveRelativeOffsetOfLocalHeader - dataOffset += UInt64(LocalFileHeader.size) - dataOffset += UInt64(localFileHeader.fileNameLength) - dataOffset += UInt64(localFileHeader.extraFieldLength) - return dataOffset - } - - static func == (lhs: Entry, rhs: Entry) -> Bool { - lhs.path == rhs.path - && lhs.localFileHeader.crc32 == rhs.localFileHeader.crc32 - && lhs.centralDirectoryStructure.effectiveRelativeOffsetOfLocalHeader - == rhs.centralDirectoryStructure.effectiveRelativeOffsetOfLocalHeader - } - - /// Returns the `path` of the receiver within a ZIP `Archive` using a given encoding. - /// - /// - Parameters: - /// - encoding: `String.Encoding` - func path(using encoding: String.Encoding) -> String { - String(data: centralDirectoryStructure.fileNameData, encoding: encoding) ?? "" - } - -} - -extension Entry.CentralDirectoryStructure { - - init( - localFileHeader: Entry.LocalFileHeader, - fileAttributes: UInt32, - relativeOffset: UInt32, - extraField: (length: UInt16, data: Data)) - { - versionMadeBy = UInt16(789) - versionNeededToExtract = localFileHeader.versionNeededToExtract - generalPurposeBitFlag = localFileHeader.generalPurposeBitFlag - compressionMethod = localFileHeader.compressionMethod - lastModFileTime = localFileHeader.lastModFileTime - lastModFileDate = localFileHeader.lastModFileDate - crc32 = localFileHeader.crc32 - compressedSize = localFileHeader.compressedSize - uncompressedSize = localFileHeader.uncompressedSize - fileNameLength = localFileHeader.fileNameLength - extraFieldLength = extraField.length - fileCommentLength = UInt16(0) - diskNumberStart = UInt16(0) - internalFileAttributes = UInt16(0) - externalFileAttributes = fileAttributes - relativeOffsetOfLocalHeader = relativeOffset - fileNameData = localFileHeader.fileNameData - extraFieldData = extraField.data - fileCommentData = Data() - if - let zip64ExtendedInformation = Entry.ZIP64ExtendedInformation.scanForZIP64Field( - in: extraFieldData, - fields: validFields) - { - extraFields = [zip64ExtendedInformation] - } - } - - init( - centralDirectoryStructure: Entry.CentralDirectoryStructure, - zip64ExtendedInformation: Entry.ZIP64ExtendedInformation?, - relativeOffset: UInt32) - { - if let existingInfo = zip64ExtendedInformation { - extraFieldData = existingInfo.data - versionNeededToExtract = max( - centralDirectoryStructure.versionNeededToExtract, - Archive.Version.v45.rawValue) - } else { - extraFieldData = centralDirectoryStructure.extraFieldData - let existingVersion = centralDirectoryStructure.versionNeededToExtract - versionNeededToExtract = existingVersion < Archive.Version.v45.rawValue - ? centralDirectoryStructure.versionNeededToExtract - : Archive.Version.v20.rawValue - } - extraFieldLength = UInt16(extraFieldData.count) - relativeOffsetOfLocalHeader = relativeOffset - versionMadeBy = centralDirectoryStructure.versionMadeBy - generalPurposeBitFlag = centralDirectoryStructure.generalPurposeBitFlag - compressionMethod = centralDirectoryStructure.compressionMethod - lastModFileTime = centralDirectoryStructure.lastModFileTime - lastModFileDate = centralDirectoryStructure.lastModFileDate - crc32 = centralDirectoryStructure.crc32 - compressedSize = centralDirectoryStructure.compressedSize - uncompressedSize = centralDirectoryStructure.uncompressedSize - fileNameLength = centralDirectoryStructure.fileNameLength - fileCommentLength = centralDirectoryStructure.fileCommentLength - diskNumberStart = centralDirectoryStructure.diskNumberStart - internalFileAttributes = centralDirectoryStructure.internalFileAttributes - externalFileAttributes = centralDirectoryStructure.externalFileAttributes - fileNameData = centralDirectoryStructure.fileNameData - fileCommentData = centralDirectoryStructure.fileCommentData - if - let zip64ExtendedInformation = Entry.ZIP64ExtendedInformation.scanForZIP64Field( - in: extraFieldData, - fields: validFields) - { - extraFields = [zip64ExtendedInformation] - } - } -} - -extension Entry.CentralDirectoryStructure { - - var effectiveCompressedSize: UInt64 { - if isZIP64, let compressedSize = zip64ExtendedInformation?.compressedSize, compressedSize > 0 { - return compressedSize - } - return UInt64(compressedSize) - } - - var effectiveUncompressedSize: UInt64 { - if isZIP64, let uncompressedSize = zip64ExtendedInformation?.uncompressedSize, uncompressedSize > 0 { - return uncompressedSize - } - return UInt64(uncompressedSize) - } - - var effectiveRelativeOffsetOfLocalHeader: UInt64 { - if isZIP64, let offset = zip64ExtendedInformation?.relativeOffsetOfLocalHeader, offset > 0 { - return offset - } - return UInt64(relativeOffsetOfLocalHeader) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/FileManager+ZIP.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/FileManager+ZIP.swift deleted file mode 100644 index 9e53fd4..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/FileManager+ZIP.swift +++ /dev/null @@ -1,368 +0,0 @@ -// -// FileManager+ZIP.swift -// ZIPFoundation -// -// Copyright © 2017-2021 Thomas Zoechling, https://www.peakstep.com and the ZIP Foundation project authors. -// Released under the MIT License. -// -// See https://github.com/weichsel/ZIPFoundation/blob/master/LICENSE for license information. -// - -import Foundation - -extension FileManager { - typealias CentralDirectoryStructure = Entry.CentralDirectoryStructure - - class func attributes(from entry: Entry) -> [FileAttributeKey: Any] { - let centralDirectoryStructure = entry.centralDirectoryStructure - let entryType = entry.type - let fileTime = centralDirectoryStructure.lastModFileTime - let fileDate = centralDirectoryStructure.lastModFileDate - let defaultPermissions = entryType == .directory ? defaultDirectoryPermissions : defaultFilePermissions - var attributes = [.posixPermissions: defaultPermissions] as [FileAttributeKey: Any] - // Certain keys are not yet supported in swift-corelibs - #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) - attributes[.modificationDate] = Date(dateTime: (fileDate, fileTime)) - #endif - let versionMadeBy = centralDirectoryStructure.versionMadeBy - guard let osType = Entry.OSType(rawValue: UInt(versionMadeBy >> 8)) else { return attributes } - - let externalFileAttributes = centralDirectoryStructure.externalFileAttributes - let permissions = permissions(for: externalFileAttributes, osType: osType, entryType: entryType) - attributes[.posixPermissions] = NSNumber(value: permissions) - return attributes - } - - class func permissions( - for externalFileAttributes: UInt32, - osType: Entry.OSType, - entryType: Entry.EntryType) - -> UInt16 - { - switch osType { - case .unix, .osx: - let permissions = mode_t(externalFileAttributes >> 16) & ~S_IFMT - let defaultPermissions = entryType == .directory ? defaultDirectoryPermissions : defaultFilePermissions - return permissions == 0 ? defaultPermissions : UInt16(permissions) - default: - return entryType == .directory ? defaultDirectoryPermissions : defaultFilePermissions - } - } - - class func externalFileAttributesForEntry(of type: Entry.EntryType, permissions: UInt16) -> UInt32 { - var typeInt: UInt16 - switch type { - case .file: - typeInt = UInt16(S_IFREG) - case .directory: - typeInt = UInt16(S_IFDIR) - case .symlink: - typeInt = UInt16(S_IFLNK) - } - var externalFileAttributes = UInt32(typeInt | UInt16(permissions)) - externalFileAttributes = (externalFileAttributes << 16) - return externalFileAttributes - } - - class func permissionsForItem(at URL: URL) throws -> UInt16 { - let fileManager = FileManager() - let entryFileSystemRepresentation = fileManager.fileSystemRepresentation(withPath: URL.path) - var fileStat = stat() - lstat(entryFileSystemRepresentation, &fileStat) - let permissions = fileStat.st_mode - return UInt16(permissions) - } - - class func fileModificationDateTimeForItem(at url: URL) throws -> Date { - let fileManager = FileManager() - guard fileManager.itemExists(at: url) else { - throw CocoaError(.fileReadNoSuchFile, userInfo: [NSFilePathErrorKey: url.path]) - } - let entryFileSystemRepresentation = fileManager.fileSystemRepresentation(withPath: url.path) - var fileStat = stat() - lstat(entryFileSystemRepresentation, &fileStat) - #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) - let modTimeSpec = fileStat.st_mtimespec - #else - let modTimeSpec = fileStat.st_mtim - #endif - - let timeStamp = TimeInterval(modTimeSpec.tv_sec) + TimeInterval(modTimeSpec.tv_nsec) / 1000000000.0 - let modDate = Date(timeIntervalSince1970: timeStamp) - return modDate - } - - class func fileSizeForItem(at url: URL) throws -> Int64 { - let fileManager = FileManager() - guard fileManager.itemExists(at: url) else { - throw CocoaError(.fileReadNoSuchFile, userInfo: [NSFilePathErrorKey: url.path]) - } - let entryFileSystemRepresentation = fileManager.fileSystemRepresentation(withPath: url.path) - var fileStat = stat() - lstat(entryFileSystemRepresentation, &fileStat) - guard fileStat.st_size >= 0 else { - throw CocoaError(.fileReadTooLarge, userInfo: [NSFilePathErrorKey: url.path]) - } - // `st_size` is a signed int value - return Int64(fileStat.st_size) - } - - class func typeForItem(at url: URL) throws -> Entry.EntryType { - let fileManager = FileManager() - guard url.isFileURL, fileManager.itemExists(at: url) else { - throw CocoaError(.fileReadNoSuchFile, userInfo: [NSFilePathErrorKey: url.path]) - } - let entryFileSystemRepresentation = fileManager.fileSystemRepresentation(withPath: url.path) - var fileStat = stat() - lstat(entryFileSystemRepresentation, &fileStat) - return Entry.EntryType(mode: mode_t(fileStat.st_mode)) - } - - /// Zips the file or directory contents at the specified source URL to the destination URL. - /// - /// If the item at the source URL is a directory, the directory itself will be - /// represented within the ZIP `Archive`. Calling this method with a directory URL - /// `file:///path/directory/` will create an archive with a `directory/` entry at the root level. - /// You can override this behavior by passing `false` for `shouldKeepParent`. In that case, the contents - /// of the source directory will be placed at the root of the archive. - /// - Parameters: - /// - sourceURL: The file URL pointing to an existing file or directory. - /// - destinationURL: The file URL that identifies the destination of the zip operation. - /// - shouldKeepParent: Indicates that the directory name of a source item should be used as root element - /// within the archive. Default is `true`. - /// - compressionMethod: Indicates the `CompressionMethod` that should be applied. - /// By default, `zipItem` will create uncompressed archives. - /// - progress: A progress object that can be used to track or cancel the zip operation. - /// - Throws: Throws an error if the source item does not exist or the destination URL is not writable. - func zipItem( - at sourceURL: URL, - to destinationURL: URL, - shouldKeepParent: Bool = true, - compressionMethod: CompressionMethod = .none, - progress: Progress? = nil) - throws - { - let fileManager = FileManager() - guard fileManager.itemExists(at: sourceURL) else { - throw CocoaError(.fileReadNoSuchFile, userInfo: [NSFilePathErrorKey: sourceURL.path]) - } - guard !fileManager.itemExists(at: destinationURL) else { - throw CocoaError(.fileWriteFileExists, userInfo: [NSFilePathErrorKey: destinationURL.path]) - } - guard let archive = Archive(url: destinationURL, accessMode: .create) else { - throw Archive.ArchiveError.unwritableArchive - } - let isDirectory = try FileManager.typeForItem(at: sourceURL) == .directory - if isDirectory { - let subPaths = try subpathsOfDirectory(atPath: sourceURL.path) - var totalUnitCount = Int64(0) - if let progress = progress { - totalUnitCount = subPaths.reduce(Int64(0)) { - let itemURL = sourceURL.appendingPathComponent($1) - let itemSize = archive.totalUnitCountForAddingItem(at: itemURL) - return $0 + itemSize - } - progress.totalUnitCount = totalUnitCount - } - - // If the caller wants to keep the parent directory, we use the lastPathComponent of the source URL - // as common base for all entries (similar to macOS' Archive Utility.app) - let directoryPrefix = sourceURL.lastPathComponent - for entryPath in subPaths { - let finalEntryPath = shouldKeepParent ? directoryPrefix + "/" + entryPath : entryPath - let finalBaseURL = shouldKeepParent ? sourceURL.deletingLastPathComponent() : sourceURL - if let progress = progress { - let itemURL = sourceURL.appendingPathComponent(entryPath) - let entryProgress = archive.makeProgressForAddingItem(at: itemURL) - progress.addChild(entryProgress, withPendingUnitCount: entryProgress.totalUnitCount) - try archive.addEntry( - with: finalEntryPath, - relativeTo: finalBaseURL, - compressionMethod: compressionMethod, - progress: entryProgress) - } else { - try archive.addEntry( - with: finalEntryPath, - relativeTo: finalBaseURL, - compressionMethod: compressionMethod) - } - } - } else { - progress?.totalUnitCount = archive.totalUnitCountForAddingItem(at: sourceURL) - let baseURL = sourceURL.deletingLastPathComponent() - try archive.addEntry( - with: sourceURL.lastPathComponent, - relativeTo: baseURL, - compressionMethod: compressionMethod, - progress: progress) - } - } - - /// Unzips the contents at the specified source URL to the destination URL. - /// - /// - Parameters: - /// - sourceURL: The file URL pointing to an existing ZIP file. - /// - destinationURL: The file URL that identifies the destination directory of the unzip operation. - /// - skipCRC32: Optional flag to skip calculation of the CRC32 checksum to improve performance. - /// - progress: A progress object that can be used to track or cancel the unzip operation. - /// - preferredEncoding: Encoding for entry paths. Overrides the encoding specified in the archive. - /// - Throws: Throws an error if the source item does not exist or the destination URL is not writable. - func unzipItem( - at sourceURL: URL, - to destinationURL: URL, - skipCRC32: Bool = false, - progress: Progress? = nil, - preferredEncoding: String.Encoding? = nil) - throws - { - let fileManager = FileManager() - guard fileManager.itemExists(at: sourceURL) else { - throw CocoaError(.fileReadNoSuchFile, userInfo: [NSFilePathErrorKey: sourceURL.path]) - } - guard let archive = Archive(url: sourceURL, accessMode: .read, preferredEncoding: preferredEncoding) else { - throw Archive.ArchiveError.unreadableArchive - } - // Defer extraction of symlinks until all files & directories have been created. - // This is necessary because we can't create links to files that haven't been created yet. - let sortedEntries = archive.sorted { left, right -> Bool in - switch (left.type, right.type) { - case (.directory, .file): return true - case (.directory, .symlink): return true - case (.file, .symlink): return true - default: return false - } - } - var totalUnitCount = Int64(0) - if let progress = progress { - totalUnitCount = sortedEntries.reduce(0) { $0 + archive.totalUnitCountForReading($1) } - progress.totalUnitCount = totalUnitCount - } - - for entry in sortedEntries { - let path = preferredEncoding == nil ? entry.path : entry.path(using: preferredEncoding!) - let entryURL = destinationURL.appendingPathComponent(path) - guard entryURL.isContained(in: destinationURL) else { - throw CocoaError( - .fileReadInvalidFileName, - userInfo: [NSFilePathErrorKey: entryURL.path]) - } - let crc32: CRC32 - if let progress = progress { - let entryProgress = archive.makeProgressForReading(entry) - progress.addChild(entryProgress, withPendingUnitCount: entryProgress.totalUnitCount) - crc32 = try archive.extract(entry, to: entryURL, skipCRC32: skipCRC32, progress: entryProgress) - } else { - crc32 = try archive.extract(entry, to: entryURL, skipCRC32: skipCRC32) - } - - func verifyChecksumIfNecessary() throws { - if skipCRC32 == false, crc32 != entry.checksum { - throw Archive.ArchiveError.invalidCRC32 - } - } - try verifyChecksumIfNecessary() - } - } - - // MARK: - Helpers - - func itemExists(at url: URL) -> Bool { - // Use `URL.checkResourceIsReachable()` instead of `FileManager.fileExists()` here - // because we don't want implicit symlink resolution. - // As per documentation, `FileManager.fileExists()` traverses symlinks and therefore a broken symlink - // would throw a `.fileReadNoSuchFile` false positive error. - // For ZIP files it may be intended to archive "broken" symlinks because they might be - // resolvable again when extracting the archive to a different destination. - (try? url.checkResourceIsReachable()) == true - } - - func createParentDirectoryStructure(for url: URL) throws { - let parentDirectoryURL = url.deletingLastPathComponent() - try createDirectory(at: parentDirectoryURL, withIntermediateDirectories: true, attributes: nil) - } - -} - -extension Date { - - // MARK: Lifecycle - - init(dateTime: (UInt16, UInt16)) { - var msdosDateTime = Int(dateTime.0) - msdosDateTime <<= 16 - msdosDateTime |= Int(dateTime.1) - var unixTime = tm() - unixTime.tm_sec = Int32((msdosDateTime & 31) * 2) - unixTime.tm_min = Int32((msdosDateTime >> 5) & 63) - unixTime.tm_hour = Int32((Int(dateTime.1) >> 11) & 31) - unixTime.tm_mday = Int32((msdosDateTime >> 16) & 31) - unixTime.tm_mon = Int32((msdosDateTime >> 21) & 15) - unixTime.tm_mon -= 1 // UNIX time struct month entries are zero based. - unixTime.tm_year = Int32(1980 + (msdosDateTime >> 25)) - unixTime.tm_year -= 1900 // UNIX time structs count in "years since 1900". - let time = timegm(&unixTime) - self = Date(timeIntervalSince1970: TimeInterval(time)) - } - - // MARK: Internal - - var fileModificationDateTime: (UInt16, UInt16) { - return (self.fileModificationDate, self.fileModificationTime) - } - - var fileModificationDate: UInt16 { - var time = time_t(timeIntervalSince1970) - guard let unixTime = gmtime(&time) else { - return 0 - } - var year = unixTime.pointee.tm_year + 1900 // UNIX time structs count in "years since 1900". - // ZIP uses the MSDOS date format which has a valid range of 1980 - 2099. - year = year >= 1980 ? year : 1980 - year = year <= 2099 ? year : 2099 - let month = unixTime.pointee.tm_mon + 1 // UNIX time struct month entries are zero based. - let day = unixTime.pointee.tm_mday - return (UInt16)(day + (month * 32) + ((year - 1980) * 512)) - } - - var fileModificationTime: UInt16 { - var time = time_t(timeIntervalSince1970) - guard let unixTime = gmtime(&time) else { - return 0 - } - let hour = unixTime.pointee.tm_hour - let minute = unixTime.pointee.tm_min - let second = unixTime.pointee.tm_sec - return (UInt16)((second / 2) + (minute * 32) + (hour * 2048)) - } -} - -#if swift(>=4.2) -#else - -#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) -#else - -// The swift-corelibs-foundation version of NSError.swift was missing a convenience method to create -// error objects from error codes. (https://github.com/apple/swift-corelibs-foundation/pull/1420) -// We have to provide an implementation for non-Darwin platforms using Swift versions < 4.2. - -extension CocoaError { - static func error(_ code: CocoaError.Code, userInfo: [AnyHashable: Any]? = nil, url: URL? = nil) -> Error { - var info: [String: Any] = userInfo as? [String: Any] ?? [:] - if let url = url { - info[NSURLErrorKey] = url - } - return NSError(domain: NSCocoaErrorDomain, code: code.rawValue, userInfo: info) - } -} - -#endif -#endif - -extension URL { - func isContained(in parentDirectoryURL: URL) -> Bool { - // Ensure this URL is contained in the passed in URL - let parentDirectoryURL = URL(fileURLWithPath: parentDirectoryURL.path, isDirectory: true).standardized - return standardized.absoluteString.hasPrefix(parentDirectoryURL.absoluteString) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/README.md b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/README.md deleted file mode 100644 index 24d5c63..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/README.md +++ /dev/null @@ -1,24 +0,0 @@ -## ZipFoundation - -This directory includes the source code of the ZIPFoundation library, from the following release: -https://github.com/weichsel/ZIPFoundation/releases/tag/0.9.16 - -Lottie is distributed via multiple package managers (SPM, Cocoapods, Carthage, and NPM), -each with different packaging and compilation requirements. - -Due to limitations of these package managers, we can't depend on / import -a separate ZIPFoundation module / library. Instead, we include the source -directly within the Lottie library and compile everything as a single unit. - -### Update instructions - -From time to time we may need to update to a more recent version of ZIPFoundation. -When doing this, follow these steps: - - 1. Download the latest release from https://github.com/weichsel/ZIPFoundation - and replace the source code in this directory with the updated code. - - 2. Update the URL at the top of this file to indicate what release is being used. - - 3. Change all of the `public` symbols defined in this module to instead be `internal` - to prevent Lottie from exposing any ZIPFoundation APIs. diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/URL+ZIP.swift b/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/URL+ZIP.swift deleted file mode 100644 index add5aa6..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/DotLottie/ZipFoundation/URL+ZIP.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// URL+ZIP.swift -// ZIPFoundation -// -// Copyright © 2017-2021 Thomas Zoechling, https://www.peakstep.com and the ZIP Foundation project authors. -// Released under the MIT License. -// -// See https://github.com/weichsel/ZIPFoundation/blob/master/LICENSE for license information. -// - -import Foundation - -extension URL { - - static func temporaryReplacementDirectoryURL(for archive: Archive) -> URL { - #if swift(>=5.0) || os(macOS) || os(iOS) || os(watchOS) || os(tvOS) - if - archive.url.isFileURL, - let tempDir = try? FileManager().url( - for: .itemReplacementDirectory, - in: .userDomainMask, - appropriateFor: archive.url, - create: true) - { - return tempDir - } - #endif - - return URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent( - ProcessInfo.processInfo.globallyUniqueString) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Extensions/Bundle.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Extensions/Bundle.swift deleted file mode 100644 index 10c85ba..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Extensions/Bundle.swift +++ /dev/null @@ -1,51 +0,0 @@ -import Foundation -#if os(iOS) || os(tvOS) || os(watchOS) || targetEnvironment(macCatalyst) -import UIKit -#endif - -extension Bundle { - func getAnimationData(_ name: String, subdirectory: String? = nil) throws -> Data { - // Check for files in the bundle at the given path - let name = name.removingJSONSuffix() - if let url = url(forResource: name, withExtension: "json", subdirectory: subdirectory) { - return try Data(contentsOf: url) - } - - // Check for data assets - let assetKey = subdirectory != nil ? "\(subdirectory ?? "")/\(name)" : name - return try Data(assetName: assetKey, in: self) - } - - func dotLottieData(_ name: String, subdirectory: String? = nil) throws -> Data { - // Check for files in the bundle at the given path - let name = name.removingDotLottieSuffix() - if let url = url(forResource: name, withExtension: "lottie", subdirectory: subdirectory) { - return try Data(contentsOf: url) - } - - let assetKey = subdirectory != nil ? "\(subdirectory ?? "")/\(name)" : name - return try Data(assetName: assetKey, in: self) - } -} - -extension String { - fileprivate func removingJSONSuffix() -> String { - // Allow filenames to be passed with a ".json" extension (but not other extensions) - // to keep the behavior from Lottie 2.x - instead of failing to load the animation - guard hasSuffix(".json") else { - return self - } - - return (self as NSString).deletingPathExtension - } - - fileprivate func removingDotLottieSuffix() -> String { - // Allow filenames to be passed with a ".lottie" extension (but not other extensions) - // to keep the behavior from Lottie 2.x - instead of failing to load the file - guard hasSuffix(".lottie") else { - return self - } - - return (self as NSString).deletingPathExtension - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Extensions/KeyedDecodingContainerExtensions.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Extensions/KeyedDecodingContainerExtensions.swift deleted file mode 100644 index c0d8d75..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Extensions/KeyedDecodingContainerExtensions.swift +++ /dev/null @@ -1,44 +0,0 @@ -// From: https://medium.com/@kewindannerfjordremeczki/swift-4-0-decodable-heterogeneous-collections-ecc0e6b468cf - -import Foundation - -// MARK: - ClassFamily - -/// To support a new class family, create an enum that conforms to this protocol and contains the different types. -protocol ClassFamily: Decodable { - /// The discriminator key. - static var discriminator: Discriminator { get } - - /// Returns the class type of the object corresponding to the value. - func getType() -> AnyObject.Type -} - -// MARK: - Discriminator - -/// Discriminator key enum used to retrieve discriminator fields in JSON payloads. -enum Discriminator: String, CodingKey { - case type = "ty" -} - -extension KeyedDecodingContainer { - - /// Decode a heterogeneous list of objects for a given family. - /// - Parameters: - /// - heterogeneousType: The decodable type of the list. - /// - family: The ClassFamily enum for the type family. - /// - key: The CodingKey to look up the list in the current container. - /// - Returns: The resulting list of heterogeneousType elements. - func decode(_: [T].Type, ofFamily family: U.Type, forKey key: K) throws -> [T] { - var container = try nestedUnkeyedContainer(forKey: key) - var list = [T]() - var tmpContainer = container - while !container.isAtEnd { - let typeContainer = try container.nestedContainer(keyedBy: Discriminator.self) - let family: U = try typeContainer.decode(U.self, forKey: U.discriminator) - if let type = family.getType() as? T.Type { - list.append(try tmpContainer.decode(type)) - } - } - return list - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Keyframes/KeyframeData.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Keyframes/KeyframeData.swift deleted file mode 100644 index 0bc767c..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Keyframes/KeyframeData.swift +++ /dev/null @@ -1,113 +0,0 @@ -// -// Keyframe.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/7/19. -// - -import CoreGraphics -import Foundation - -// MARK: - KeyframeData - -/// A generic class used to parse and remap keyframe json. -/// -/// Keyframe json has a couple of different variations and formats depending on the -/// type of keyframea and also the version of the JSON. By parsing the raw data -/// we can reconfigure it into a constant format. -final class KeyframeData { - - // MARK: Lifecycle - - init( - startValue: T?, - endValue: T?, - time: AnimationFrameTime?, - hold: Int?, - inTangent: LottieVector2D?, - outTangent: LottieVector2D?, - spatialInTangent: LottieVector3D?, - spatialOutTangent: LottieVector3D?) - { - self.startValue = startValue - self.endValue = endValue - self.time = time - self.hold = hold - self.inTangent = inTangent - self.outTangent = outTangent - self.spatialInTangent = spatialInTangent - self.spatialOutTangent = spatialOutTangent - } - - // MARK: Internal - - enum CodingKeys: String, CodingKey { - case startValue = "s" - case endValue = "e" - case time = "t" - case hold = "h" - case inTangent = "i" - case outTangent = "o" - case spatialInTangent = "ti" - case spatialOutTangent = "to" - } - - /// The start value of the keyframe - let startValue: T? - /// The End value of the keyframe. Note: Newer versions animation json do not have this field. - let endValue: T? - /// The time in frames of the keyframe. - let time: AnimationFrameTime? - /// A hold keyframe freezes interpolation until the next keyframe that is not a hold. - let hold: Int? - - /// The in tangent for the time interpolation curve. - let inTangent: LottieVector2D? - /// The out tangent for the time interpolation curve. - let outTangent: LottieVector2D? - - /// The spacial in tangent of the vector. - let spatialInTangent: LottieVector3D? - /// The spacial out tangent of the vector. - let spatialOutTangent: LottieVector3D? - - var isHold: Bool { - if let hold = hold { - return hold > 0 - } - return false - } -} - -// MARK: Encodable - -extension KeyframeData: Encodable where T: Encodable { } - -// MARK: Decodable - -extension KeyframeData: Decodable where T: Decodable { } - -// MARK: DictionaryInitializable - -extension KeyframeData: DictionaryInitializable where T: AnyInitializable { - convenience init(dictionary: [String: Any]) throws { - let startValue = try? dictionary[CodingKeys.startValue.rawValue].flatMap(T.init) - let endValue = try? dictionary[CodingKeys.endValue.rawValue].flatMap(T.init) - let time: AnimationFrameTime? = try? dictionary.value(for: CodingKeys.time) - let hold: Int? = try? dictionary.value(for: CodingKeys.hold) - let inTangent: LottieVector2D? = try? dictionary.value(for: CodingKeys.inTangent) - let outTangent: LottieVector2D? = try? dictionary.value(for: CodingKeys.outTangent) - let spatialInTangent: LottieVector3D? = try? dictionary.value(for: CodingKeys.spatialInTangent) - let spatialOutTangent: LottieVector3D? = try? dictionary.value(for: CodingKeys.spatialOutTangent) - - self.init( - startValue: startValue, - endValue: endValue, - time: time, - hold: hold, - inTangent: inTangent, - outTangent: outTangent, - spatialInTangent: spatialInTangent, - spatialOutTangent: spatialOutTangent) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Keyframes/KeyframeGroup.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Keyframes/KeyframeGroup.swift deleted file mode 100644 index 8fca538..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Keyframes/KeyframeGroup.swift +++ /dev/null @@ -1,252 +0,0 @@ -// -// KeyframeGroup.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/14/19. -// - -import Foundation - -// MARK: - KeyframeGroup - -/// Used for coding/decoding a group of Keyframes by type. -/// -/// Keyframe data is wrapped in a dictionary { "k" : KeyframeData }. -/// The keyframe data can either be an array of keyframes or, if no animation is present, the raw value. -/// This helper object is needed to properly decode the json. - -final class KeyframeGroup { - - // MARK: Lifecycle - - init( - keyframes: ContiguousArray>, - unsupportedAfterEffectsExpression: String? = nil) - { - self.keyframes = keyframes - self.unsupportedAfterEffectsExpression = unsupportedAfterEffectsExpression - } - - init( - _ value: T, - unsupportedAfterEffectsExpression: String? = nil) - { - keyframes = [Keyframe(value)] - self.unsupportedAfterEffectsExpression = unsupportedAfterEffectsExpression - } - - // MARK: Internal - - enum KeyframeWrapperKey: String, CodingKey { - case keyframeData = "k" - case unsupportedAfterEffectsExpression = "x" - } - - let keyframes: ContiguousArray> - - /// lottie-ios doesn't support After Effects expressions, but we parse them so we can log diagnostics. - /// More info: https://helpx.adobe.com/after-effects/using/expression-basics.html - let unsupportedAfterEffectsExpression: String? - -} - -// MARK: Decodable - -extension KeyframeGroup: Decodable where T: Decodable { - convenience init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: KeyframeWrapperKey.self) - let unsupportedAfterEffectsExpression = try? container.decode(String.self, forKey: .unsupportedAfterEffectsExpression) - - if let keyframeData: T = try? container.decode(T.self, forKey: .keyframeData) { - /// Try to decode raw value; No keyframe data. - self.init( - keyframes: [Keyframe(keyframeData)], - unsupportedAfterEffectsExpression: unsupportedAfterEffectsExpression) - } else { - // Decode and array of keyframes. - // - // Body Movin and Lottie deal with keyframes in different ways. - // - // A keyframe object in Body movin defines a span of time with a START - // and an END, from the current keyframe time to the next keyframe time. - // - // A keyframe object in Lottie defines a singular point in time/space. - // This point has an in-tangent and an out-tangent. - // - // To properly decode this we must iterate through keyframes while holding - // reference to the previous keyframe. - - var keyframesContainer = try container.nestedUnkeyedContainer(forKey: .keyframeData) - var keyframes = ContiguousArray>() - var previousKeyframeData: KeyframeData? - while !keyframesContainer.isAtEnd { - // Ensure that Time and Value are present. - - let keyframeData = try keyframesContainer.decode(KeyframeData.self) - - guard - let value: T = keyframeData.startValue ?? previousKeyframeData?.endValue, - let time = keyframeData.time else - { - /// Missing keyframe data. JSON must be corrupt. - throw DecodingError.dataCorruptedError( - forKey: KeyframeWrapperKey.keyframeData, - in: container, - debugDescription: "Missing keyframe data.") - } - - keyframes.append(Keyframe( - value: value, - time: AnimationFrameTime(time), - isHold: keyframeData.isHold, - inTangent: previousKeyframeData?.inTangent, - outTangent: keyframeData.outTangent, - spatialInTangent: previousKeyframeData?.spatialInTangent, - spatialOutTangent: keyframeData.spatialOutTangent)) - previousKeyframeData = keyframeData - } - self.init( - keyframes: keyframes, - unsupportedAfterEffectsExpression: unsupportedAfterEffectsExpression) - } - } -} - -// MARK: Encodable - -extension KeyframeGroup: Encodable where T: Encodable { - func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: KeyframeWrapperKey.self) - - if keyframes.count == 1 { - let keyframe = keyframes[0] - try container.encode(keyframe.value, forKey: .keyframeData) - } else { - var keyframeContainer = container.nestedUnkeyedContainer(forKey: .keyframeData) - - for i in 1..( - startValue: keyframe.value, - endValue: nextKeyframe.value, - time: keyframe.time, - hold: keyframe.isHold ? 1 : nil, - inTangent: nextKeyframe.inTangent, - outTangent: keyframe.outTangent, - spatialInTangent: nil, - spatialOutTangent: nil) - try keyframeContainer.encode(keyframeData) - } - } - } -} - -// MARK: DictionaryInitializable - -extension KeyframeGroup: DictionaryInitializable where T: AnyInitializable { - convenience init(dictionary: [String: Any]) throws { - var keyframes = ContiguousArray>() - let unsupportedAfterEffectsExpression = dictionary[KeyframeWrapperKey.unsupportedAfterEffectsExpression.rawValue] as? String - if - let rawValue = dictionary[KeyframeWrapperKey.keyframeData.rawValue], - let value = try? T(value: rawValue) - { - keyframes = [Keyframe(value)] - } else { - var frameDictionaries: [[String: Any]] - if let singleFrameDictionary = dictionary[KeyframeWrapperKey.keyframeData.rawValue] as? [String: Any] { - frameDictionaries = [singleFrameDictionary] - } else { - frameDictionaries = try dictionary.value(for: KeyframeWrapperKey.keyframeData) - } - var previousKeyframeData: KeyframeData? - for frameDictionary in frameDictionaries { - let data = try KeyframeData(dictionary: frameDictionary) - guard - let value: T = data.startValue ?? previousKeyframeData?.endValue, - let time = data.time else - { - throw InitializableError.invalidInput - } - keyframes.append(Keyframe( - value: value, - time: time, - isHold: data.isHold, - inTangent: previousKeyframeData?.inTangent, - outTangent: data.outTangent, - spatialInTangent: previousKeyframeData?.spatialInTangent, - spatialOutTangent: data.spatialOutTangent)) - previousKeyframeData = data - } - } - - self.init( - keyframes: keyframes, - unsupportedAfterEffectsExpression: unsupportedAfterEffectsExpression) - } -} - -// MARK: Equatable - -extension KeyframeGroup: Equatable where T: Equatable { - static func == (_ lhs: KeyframeGroup, _ rhs: KeyframeGroup) -> Bool { - lhs.keyframes == rhs.keyframes - } -} - -// MARK: Hashable - -extension KeyframeGroup: Hashable where T: Hashable { - func hash(into hasher: inout Hasher) { - hasher.combine(keyframes) - } -} - -extension Keyframe { - /// Creates a copy of this `Keyframe` with the same timing data, but a different value - func withValue(_ newValue: Value) -> Keyframe { - Keyframe( - value: newValue, - time: time, - isHold: isHold, - inTangent: inTangent, - outTangent: outTangent, - spatialInTangent: spatialInTangent, - spatialOutTangent: spatialOutTangent) - } -} - -extension KeyframeGroup { - /// Maps the values of each individual keyframe in this group - func map(_ transformation: (T) throws -> NewValue) rethrows -> KeyframeGroup { - KeyframeGroup( - keyframes: ContiguousArray(try keyframes.map { keyframe in - keyframe.withValue(try transformation(keyframe.value)) - }), - unsupportedAfterEffectsExpression: unsupportedAfterEffectsExpression) - } -} - -// MARK: - AnyKeyframeGroup - -/// A type-erased wrapper for `KeyframeGroup`s -protocol AnyKeyframeGroup { - /// An untyped copy of these keyframes - var untyped: KeyframeGroup { get } - - /// An untyped `KeyframeInterpolator` for these keyframes - var interpolator: AnyValueProvider { get } -} - -// MARK: - KeyframeGroup + AnyKeyframeGroup - -extension KeyframeGroup: AnyKeyframeGroup where T: AnyInterpolatable { - var untyped: KeyframeGroup { - map { $0 as Any } - } - - var interpolator: AnyValueProvider { - KeyframeInterpolator(keyframes: keyframes) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Layers/ImageLayerModel.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Layers/ImageLayerModel.swift deleted file mode 100644 index 91ea324..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Layers/ImageLayerModel.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// ImageLayer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -/// A layer that holds an image. -final class ImageLayerModel: LayerModel { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: ImageLayerModel.CodingKeys.self) - referenceID = try container.decode(String.self, forKey: .referenceID) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - referenceID = try dictionary.value(for: CodingKeys.referenceID) - try super.init(dictionary: dictionary) - } - - // MARK: Internal - - /// The reference ID of the image. - let referenceID: String - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(referenceID, forKey: .referenceID) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case referenceID = "refId" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Layers/LayerModel.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Layers/LayerModel.swift deleted file mode 100644 index 5fc3807..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Layers/LayerModel.swift +++ /dev/null @@ -1,228 +0,0 @@ -// -// Layer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/7/19. -// - -import Foundation - -// MARK: - LayerType + ClassFamily - -/// Used for mapping a heterogeneous list to classes for parsing. -extension LayerType: ClassFamily { - static var discriminator: Discriminator = .type - - func getType() -> AnyObject.Type { - switch self { - case .precomp: - return PreCompLayerModel.self - case .solid: - return SolidLayerModel.self - case .image: - return ImageLayerModel.self - case .null: - return LayerModel.self - case .shape: - return ShapeLayerModel.self - case .text: - return TextLayerModel.self - } - } -} - -// MARK: - LayerType - -public enum LayerType: Int, Codable { - case precomp - case solid - case image - case null - case shape - case text - - public init(from decoder: Decoder) throws { - self = try LayerType(rawValue: decoder.singleValueContainer().decode(RawValue.self)) ?? .null - } -} - -// MARK: - MatteType - -public enum MatteType: Int, Codable { - case none - case add - case invert - case unknown -} - -// MARK: - BlendMode - -public enum BlendMode: Int, Codable { - case normal - case multiply - case screen - case overlay - case darken - case lighten - case colorDodge - case colorBurn - case hardLight - case softLight - case difference - case exclusion - case hue - case saturation - case color - case luminosity -} - -// MARK: - LayerModel - -/// A base top container for shapes, images, and other view objects. -class LayerModel: Codable, DictionaryInitializable { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: LayerModel.CodingKeys.self) - name = try container.decodeIfPresent(String.self, forKey: .name) ?? "Layer" - index = try container.decodeIfPresent(Int.self, forKey: .index) ?? .random(in: Int.min...Int.max) - type = try container.decode(LayerType.self, forKey: .type) - coordinateSpace = try container.decodeIfPresent(CoordinateSpace.self, forKey: .coordinateSpace) ?? .type2d - inFrame = try container.decode(Double.self, forKey: .inFrame) - outFrame = try container.decode(Double.self, forKey: .outFrame) - startTime = try container.decode(Double.self, forKey: .startTime) - transform = try container.decode(Transform.self, forKey: .transform) - parent = try container.decodeIfPresent(Int.self, forKey: .parent) - blendMode = try container.decodeIfPresent(BlendMode.self, forKey: .blendMode) ?? .normal - masks = try container.decodeIfPresent([Mask].self, forKey: .masks) - timeStretch = try container.decodeIfPresent(Double.self, forKey: .timeStretch) ?? 1 - matte = try container.decodeIfPresent(MatteType.self, forKey: .matte) - hidden = try container.decodeIfPresent(Bool.self, forKey: .hidden) ?? false - } - - required init(dictionary: [String: Any]) throws { - name = (try? dictionary.value(for: CodingKeys.name)) ?? "Layer" - index = try dictionary.value(for: CodingKeys.index) ?? .random(in: Int.min...Int.max) - type = LayerType(rawValue: try dictionary.value(for: CodingKeys.type)) ?? .null - if - let coordinateSpaceRawValue = dictionary[CodingKeys.coordinateSpace.rawValue] as? Int, - let coordinateSpace = CoordinateSpace(rawValue: coordinateSpaceRawValue) - { - self.coordinateSpace = coordinateSpace - } else { - coordinateSpace = .type2d - } - inFrame = try dictionary.value(for: CodingKeys.inFrame) - outFrame = try dictionary.value(for: CodingKeys.outFrame) - startTime = try dictionary.value(for: CodingKeys.startTime) - transform = try Transform(dictionary: try dictionary.value(for: CodingKeys.transform)) - parent = try? dictionary.value(for: CodingKeys.parent) - if - let blendModeRawValue = dictionary[CodingKeys.blendMode.rawValue] as? Int, - let blendMode = BlendMode(rawValue: blendModeRawValue) - { - self.blendMode = blendMode - } else { - blendMode = .normal - } - if let maskDictionaries = dictionary[CodingKeys.masks.rawValue] as? [[String: Any]] { - masks = try maskDictionaries.map { try Mask(dictionary: $0) } - } else { - masks = nil - } - timeStretch = (try? dictionary.value(for: CodingKeys.timeStretch)) ?? 1 - if let matteRawValue = dictionary[CodingKeys.matte.rawValue] as? Int { - matte = MatteType(rawValue: matteRawValue) - } else { - matte = nil - } - hidden = (try? dictionary.value(for: CodingKeys.hidden)) ?? false - } - - // MARK: Internal - - /// The readable name of the layer - let name: String - - /// The index of the layer - let index: Int - - /// The type of the layer. - let type: LayerType - - /// The coordinate space - let coordinateSpace: CoordinateSpace - - /// The in time of the layer in frames. - let inFrame: Double - /// The out time of the layer in frames. - let outFrame: Double - - /// The start time of the layer in frames. - let startTime: Double - - /// The transform of the layer - let transform: Transform - - /// The index of the parent layer, if applicable. - let parent: Int? - - /// The blending mode for the layer - let blendMode: BlendMode - - /// An array of masks for the layer. - let masks: [Mask]? - - /// A number that stretches time by a multiplier - let timeStretch: Double - - /// The type of matte if any. - let matte: MatteType? - - let hidden: Bool - - // MARK: Fileprivate - - fileprivate enum CodingKeys: String, CodingKey { - case name = "nm" - case index = "ind" - case type = "ty" - case coordinateSpace = "ddd" - case inFrame = "ip" - case outFrame = "op" - case startTime = "st" - case transform = "ks" - case parent - case blendMode = "bm" - case masks = "masksProperties" - case timeStretch = "sr" - case matte = "tt" - case hidden = "hd" - } -} - -extension Array where Element == LayerModel { - - static func fromDictionaries(_ dictionaries: [[String: Any]]) throws -> [LayerModel] { - try dictionaries.compactMap { dictionary in - let layerType = dictionary[LayerModel.CodingKeys.type.rawValue] as? Int - switch LayerType(rawValue: layerType ?? LayerType.null.rawValue) { - case .precomp: - return try PreCompLayerModel(dictionary: dictionary) - case .solid: - return try SolidLayerModel(dictionary: dictionary) - case .image: - return try ImageLayerModel(dictionary: dictionary) - case .null: - return try LayerModel(dictionary: dictionary) - case .shape: - return try ShapeLayerModel(dictionary: dictionary) - case .text: - return try TextLayerModel(dictionary: dictionary) - case .none: - return nil - } - } - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Layers/PreCompLayerModel.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Layers/PreCompLayerModel.swift deleted file mode 100644 index e1cb11c..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Layers/PreCompLayerModel.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// PreCompLayer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -/// A layer that holds another animation composition. -final class PreCompLayerModel: LayerModel { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: PreCompLayerModel.CodingKeys.self) - referenceID = try container.decode(String.self, forKey: .referenceID) - timeRemapping = try container.decodeIfPresent(KeyframeGroup.self, forKey: .timeRemapping) - width = try container.decode(Double.self, forKey: .width) - height = try container.decode(Double.self, forKey: .height) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - referenceID = try dictionary.value(for: CodingKeys.referenceID) - if let timeRemappingDictionary = dictionary[CodingKeys.timeRemapping.rawValue] as? [String: Any] { - timeRemapping = try KeyframeGroup(dictionary: timeRemappingDictionary) - } else { - timeRemapping = nil - } - width = try dictionary.value(for: CodingKeys.width) - height = try dictionary.value(for: CodingKeys.height) - try super.init(dictionary: dictionary) - } - - // MARK: Internal - - /// The reference ID of the precomp. - let referenceID: String - - /// A value that remaps time over time. - let timeRemapping: KeyframeGroup? - - /// Precomp Width - let width: Double - - /// Precomp Height - let height: Double - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(referenceID, forKey: .referenceID) - try container.encode(timeRemapping, forKey: .timeRemapping) - try container.encode(width, forKey: .width) - try container.encode(height, forKey: .height) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case referenceID = "refId" - case timeRemapping = "tm" - case width = "w" - case height = "h" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Layers/ShapeLayerModel.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Layers/ShapeLayerModel.swift deleted file mode 100644 index b9562ad..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Layers/ShapeLayerModel.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// ShapeLayer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -/// A layer that holds vector shape objects. -final class ShapeLayerModel: LayerModel { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: ShapeLayerModel.CodingKeys.self) - items = try container.decode([ShapeItem].self, ofFamily: ShapeType.self, forKey: .items) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - let itemDictionaries: [[String: Any]] = try dictionary.value(for: CodingKeys.items) - items = try [ShapeItem].fromDictionaries(itemDictionaries) - try super.init(dictionary: dictionary) - } - - // MARK: Internal - - /// A list of shape items. - let items: [ShapeItem] - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(items, forKey: .items) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case items = "shapes" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Layers/SolidLayerModel.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Layers/SolidLayerModel.swift deleted file mode 100644 index 9ad232a..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Layers/SolidLayerModel.swift +++ /dev/null @@ -1,56 +0,0 @@ -// -// SolidLayer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -/// A layer that holds a solid color. -final class SolidLayerModel: LayerModel { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: SolidLayerModel.CodingKeys.self) - colorHex = try container.decode(String.self, forKey: .colorHex) - width = try container.decode(Double.self, forKey: .width) - height = try container.decode(Double.self, forKey: .height) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - colorHex = try dictionary.value(for: CodingKeys.colorHex) - width = try dictionary.value(for: CodingKeys.width) - height = try dictionary.value(for: CodingKeys.height) - try super.init(dictionary: dictionary) - } - - // MARK: Internal - - /// The color of the solid in Hex // Change to value provider. - let colorHex: String - - /// The Width of the color layer - let width: Double - - /// The height of the color layer - let height: Double - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(colorHex, forKey: .colorHex) - try container.encode(width, forKey: .width) - try container.encode(height, forKey: .height) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case colorHex = "sc" - case width = "sw" - case height = "sh" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Layers/TextLayerModel.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Layers/TextLayerModel.swift deleted file mode 100644 index 0dc6f0e..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Layers/TextLayerModel.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// TextLayer.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -/// A layer that holds text. -final class TextLayerModel: LayerModel { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: TextLayerModel.CodingKeys.self) - let textContainer = try container.nestedContainer(keyedBy: TextCodingKeys.self, forKey: .textGroup) - text = try textContainer.decode(KeyframeGroup.self, forKey: .text) - animators = try textContainer.decode([TextAnimator].self, forKey: .animators) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - let containerDictionary: [String: Any] = try dictionary.value(for: CodingKeys.textGroup) - let textDictionary: [String: Any] = try containerDictionary.value(for: TextCodingKeys.text) - text = try KeyframeGroup(dictionary: textDictionary) - let animatorDictionaries: [[String: Any]] = try containerDictionary.value(for: TextCodingKeys.animators) - animators = try animatorDictionaries.map { try TextAnimator(dictionary: $0) } - try super.init(dictionary: dictionary) - } - - // MARK: Internal - - /// The text for the layer - let text: KeyframeGroup - - /// Text animators - let animators: [TextAnimator] - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - var textContainer = container.nestedContainer(keyedBy: TextCodingKeys.self, forKey: .textGroup) - try textContainer.encode(text, forKey: .text) - try textContainer.encode(animators, forKey: .animators) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case textGroup = "t" - } - - private enum TextCodingKeys: String, CodingKey { - case text = "d" - case animators = "a" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Objects/DashPattern.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Objects/DashPattern.swift deleted file mode 100644 index 2a70d0b..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Objects/DashPattern.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// DashPattern.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/22/19. -// - -import Foundation - -// MARK: - DashElementType - -enum DashElementType: String, Codable { - case offset = "o" - case dash = "d" - case gap = "g" -} - -// MARK: - DashElement - -final class DashElement: Codable, DictionaryInitializable { - - // MARK: Lifecycle - - init(dictionary: [String: Any]) throws { - let typeRawValue: String = try dictionary.value(for: CodingKeys.type) - guard let type = DashElementType(rawValue: typeRawValue) else { - throw InitializableError.invalidInput - } - self.type = type - let valueDictionary: [String: Any] = try dictionary.value(for: CodingKeys.value) - value = try KeyframeGroup(dictionary: valueDictionary) - } - - // MARK: Internal - - enum CodingKeys: String, CodingKey { - case type = "n" - case value = "v" - } - - let type: DashElementType - let value: KeyframeGroup - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Objects/Marker.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Objects/Marker.swift deleted file mode 100644 index d981a2c..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Objects/Marker.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// Marker.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/9/19. -// - -import Foundation - -/// A time marker -final class Marker: Codable, DictionaryInitializable { - - // MARK: Lifecycle - - init(dictionary: [String: Any]) throws { - name = try dictionary.value(for: CodingKeys.name) - frameTime = try dictionary.value(for: CodingKeys.frameTime) - durationFrameTime = try dictionary.value(for: CodingKeys.durationFrameTime) - } - - // MARK: Internal - - enum CodingKeys: String, CodingKey { - case name = "cm" - case frameTime = "tm" - case durationFrameTime = "dr" - } - - /// The Marker Name - let name: String - - /// The Frame time of the marker - let frameTime: AnimationFrameTime - - /// The duration of the marker, in frames. - let durationFrameTime: AnimationFrameTime -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Objects/Mask.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Objects/Mask.swift deleted file mode 100644 index 10762d5..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Objects/Mask.swift +++ /dev/null @@ -1,82 +0,0 @@ -// -// Mask.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -// MARK: - MaskMode - -enum MaskMode: String, Codable { - case add = "a" - case subtract = "s" - case intersect = "i" - case lighten = "l" - case darken = "d" - case difference = "f" - case none = "n" -} - -// MARK: - Mask - -final class Mask: Codable, DictionaryInitializable { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: Mask.CodingKeys.self) - mode = try container.decodeIfPresent(MaskMode.self, forKey: .mode) ?? .add - opacity = try container - .decodeIfPresent(KeyframeGroup.self, forKey: .opacity) ?? KeyframeGroup(LottieVector1D(100)) - shape = try container.decode(KeyframeGroup.self, forKey: .shape) - inverted = try container.decodeIfPresent(Bool.self, forKey: .inverted) ?? false - expansion = try container - .decodeIfPresent(KeyframeGroup.self, forKey: .expansion) ?? KeyframeGroup(LottieVector1D(0)) - } - - init(dictionary: [String: Any]) throws { - if - let modeRawType = dictionary[CodingKeys.mode.rawValue] as? String, - let mode = MaskMode(rawValue: modeRawType) - { - self.mode = mode - } else { - mode = .add - } - if let opacityDictionary = dictionary[CodingKeys.opacity.rawValue] as? [String: Any] { - opacity = try KeyframeGroup(dictionary: opacityDictionary) - } else { - opacity = KeyframeGroup(LottieVector1D(100)) - } - let shapeDictionary: [String: Any] = try dictionary.value(for: CodingKeys.shape) - shape = try KeyframeGroup(dictionary: shapeDictionary) - inverted = (try? dictionary.value(for: CodingKeys.inverted)) ?? false - if let expansionDictionary = dictionary[CodingKeys.expansion.rawValue] as? [String: Any] { - expansion = try KeyframeGroup(dictionary: expansionDictionary) - } else { - expansion = KeyframeGroup(LottieVector1D(0)) - } - } - - // MARK: Internal - - enum CodingKeys: String, CodingKey { - case mode - case opacity = "o" - case inverted = "inv" - case shape = "pt" - case expansion = "x" - } - - let mode: MaskMode - - let opacity: KeyframeGroup - - let shape: KeyframeGroup - - let inverted: Bool - - let expansion: KeyframeGroup -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Objects/Transform.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Objects/Transform.swift deleted file mode 100644 index f7a8712..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Objects/Transform.swift +++ /dev/null @@ -1,224 +0,0 @@ -// -// Transform.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/7/19. -// - -import Foundation - -/// The animatable transform for a layer. Controls position, rotation, scale, and opacity. -final class Transform: Codable, DictionaryInitializable { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - /// This manual override of decode is required because we want to throw an error - /// in the case that there is not position data. - let container = try decoder.container(keyedBy: Transform.CodingKeys.self) - - // AnchorPoint - anchorPoint = try container - .decodeIfPresent(KeyframeGroup.self, forKey: .anchorPoint) ?? - KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0)) - - // Position - if container.contains(.positionX), container.contains(.positionY) { - // Position dimensions are split into two keyframe groups - positionX = try container.decode(KeyframeGroup.self, forKey: .positionX) - positionY = try container.decode(KeyframeGroup.self, forKey: .positionY) - position = nil - } else if let positionKeyframes = try? container.decode(KeyframeGroup.self, forKey: .position) { - // Position dimensions are a single keyframe group. - position = positionKeyframes - positionX = nil - positionY = nil - } else if - let positionContainer = try? container.nestedContainer(keyedBy: PositionCodingKeys.self, forKey: .position), - let positionX = try? positionContainer.decode(KeyframeGroup.self, forKey: .positionX), - let positionY = try? positionContainer.decode(KeyframeGroup.self, forKey: .positionY) - { - /// Position keyframes are split and nested. - self.positionX = positionX - self.positionY = positionY - position = nil - } else { - /// Default value. - position = KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0)) - positionX = nil - positionY = nil - } - - // Scale - scale = try container - .decodeIfPresent(KeyframeGroup.self, forKey: .scale) ?? - KeyframeGroup(LottieVector3D(x: Double(100), y: 100, z: 100)) - - // Rotation - if let rotation = try container.decodeIfPresent(KeyframeGroup.self, forKey: .rotationX) { - rotationX = rotation - } else { - rotationX = KeyframeGroup(LottieVector1D(0)) - } - - if let rotation = try container.decodeIfPresent(KeyframeGroup.self, forKey: .rotationY) { - rotationY = rotation - } else { - rotationY = KeyframeGroup(LottieVector1D(0)) - } - - if let rotation = try container.decodeIfPresent(KeyframeGroup.self, forKey: .rotationZ) { - rotationZ = rotation - } else { - rotationZ = try container - .decodeIfPresent(KeyframeGroup.self, forKey: .rotation) ?? KeyframeGroup(LottieVector1D(0)) - } - rotation = nil - // Opacity - opacity = try container - .decodeIfPresent(KeyframeGroup.self, forKey: .opacity) ?? KeyframeGroup(LottieVector1D(100)) - } - - init(dictionary: [String: Any]) throws { - if - let anchorPointDictionary = dictionary[CodingKeys.anchorPoint.rawValue] as? [String: Any], - let anchorPoint = try? KeyframeGroup(dictionary: anchorPointDictionary) - { - self.anchorPoint = anchorPoint - } else { - anchorPoint = KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0)) - } - - if - let xDictionary = dictionary[CodingKeys.positionX.rawValue] as? [String: Any], - let yDictionary = dictionary[CodingKeys.positionY.rawValue] as? [String: Any] - { - positionX = try KeyframeGroup(dictionary: xDictionary) - positionY = try KeyframeGroup(dictionary: yDictionary) - position = nil - } else if - let positionDictionary = dictionary[CodingKeys.position.rawValue] as? [String: Any], - positionDictionary[KeyframeGroup.KeyframeWrapperKey.keyframeData.rawValue] != nil - { - position = try KeyframeGroup(dictionary: positionDictionary) - positionX = nil - positionY = nil - } else if - let positionDictionary = dictionary[CodingKeys.position.rawValue] as? [String: Any], - let xDictionary = positionDictionary[PositionCodingKeys.positionX.rawValue] as? [String: Any], - let yDictionary = positionDictionary[PositionCodingKeys.positionY.rawValue] as? [String: Any] - { - positionX = try KeyframeGroup(dictionary: xDictionary) - positionY = try KeyframeGroup(dictionary: yDictionary) - position = nil - } else { - position = KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0)) - positionX = nil - positionY = nil - } - - if - let scaleDictionary = dictionary[CodingKeys.scale.rawValue] as? [String: Any], - let scale = try? KeyframeGroup(dictionary: scaleDictionary) - { - self.scale = scale - } else { - scale = KeyframeGroup(LottieVector3D(x: Double(100), y: 100, z: 100)) - } - - if - let rotationDictionary = dictionary[CodingKeys.rotationX.rawValue] as? [String: Any], - let rotation = try? KeyframeGroup(dictionary: rotationDictionary) - { - rotationX = rotation - } else { - rotationX = KeyframeGroup(LottieVector1D(0)) - } - - if - let rotationDictionary = dictionary[CodingKeys.rotationY.rawValue] as? [String: Any], - let rotation = try? KeyframeGroup(dictionary: rotationDictionary) - { - rotationY = rotation - } else { - rotationY = KeyframeGroup(LottieVector1D(0)) - } - - if - let rotationDictionary = dictionary[CodingKeys.rotation.rawValue] as? [String: Any], - let rotation = try? KeyframeGroup(dictionary: rotationDictionary) - { - rotationZ = rotation - } else if - let rotationDictionary = dictionary[CodingKeys.rotationZ.rawValue] as? [String: Any], - let rotation = try? KeyframeGroup(dictionary: rotationDictionary) - { - rotationZ = rotation - } - else { - rotationZ = KeyframeGroup(LottieVector1D(0)) - } - rotation = nil - if - let opacityDictionary = dictionary[CodingKeys.opacity.rawValue] as? [String: Any], - let opacity = try? KeyframeGroup(dictionary: opacityDictionary) - { - self.opacity = opacity - } else { - opacity = KeyframeGroup(LottieVector1D(100)) - } - } - - // MARK: Internal - - enum CodingKeys: String, CodingKey { - case anchorPoint = "a" - case position = "p" - case positionX = "px" - case positionY = "py" - case scale = "s" - case rotation = "r" - case rotationX = "rx" - case rotationY = "ry" - case rotationZ = "rz" - case opacity = "o" - } - - enum PositionCodingKeys: String, CodingKey { - case split = "s" - case positionX = "x" - case positionY = "y" - } - - /// The anchor point of the transform. - let anchorPoint: KeyframeGroup - - /// The position of the transform. This is nil if the position data was split. - let position: KeyframeGroup? - - /// The positionX of the transform. This is nil if the position property is set. - let positionX: KeyframeGroup? - - /// The positionY of the transform. This is nil if the position property is set. - let positionY: KeyframeGroup? - - /// The scale of the transform. - let scale: KeyframeGroup - - /// The rotation of the transform on X axis. - let rotationX: KeyframeGroup - - /// The rotation of the transform on Y axis. - let rotationY: KeyframeGroup - - /// The rotation of the transform on Z axis. - let rotationZ: KeyframeGroup - - /// The opacity of the transform. - let opacity: KeyframeGroup - - // MARK: Private - - /// Here for the CodingKeys.rotation = "r". `r` and `rz` are the same. - private let rotation: KeyframeGroup? -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Ellipse.swift b/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Ellipse.swift deleted file mode 100644 index df85286..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Ellipse.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// EllipseItem.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -// MARK: - PathDirection - -enum PathDirection: Int, Codable { - case clockwise = 1 - case userSetClockwise = 2 - case counterClockwise = 3 -} - -// MARK: - Ellipse - -final class Ellipse: ShapeItem { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: Ellipse.CodingKeys.self) - direction = try container.decodeIfPresent(PathDirection.self, forKey: .direction) ?? .clockwise - position = try container.decode(KeyframeGroup.self, forKey: .position) - size = try container.decode(KeyframeGroup.self, forKey: .size) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - if - let directionRawType = dictionary[CodingKeys.direction.rawValue] as? Int, - let direction = PathDirection(rawValue: directionRawType) - { - self.direction = direction - } else { - direction = .clockwise - } - let positionDictionary: [String: Any] = try dictionary.value(for: CodingKeys.position) - position = try KeyframeGroup(dictionary: positionDictionary) - let sizeDictionary: [String: Any] = try dictionary.value(for: CodingKeys.size) - size = try KeyframeGroup(dictionary: sizeDictionary) - try super.init(dictionary: dictionary) - } - - // MARK: Internal - - /// The direction of the ellipse. - let direction: PathDirection - - /// The position of the ellipse - let position: KeyframeGroup - - /// The size of the ellipse - let size: KeyframeGroup - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(direction, forKey: .direction) - try container.encode(position, forKey: .position) - try container.encode(size, forKey: .size) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case direction = "d" - case position = "p" - case size = "s" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Fill.swift b/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Fill.swift deleted file mode 100644 index f22dcfd..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Fill.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// FillShape.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -// MARK: - FillRule - -enum FillRule: Int, Codable { - case none - case nonZeroWinding - case evenOdd -} - -// MARK: - Fill - -final class Fill: ShapeItem { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: Fill.CodingKeys.self) - opacity = try container.decode(KeyframeGroup.self, forKey: .opacity) - color = try container.decode(KeyframeGroup.self, forKey: .color) - fillRule = try container.decodeIfPresent(FillRule.self, forKey: .fillRule) ?? .nonZeroWinding - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - let opacityDictionary: [String: Any] = try dictionary.value(for: CodingKeys.opacity) - opacity = try KeyframeGroup(dictionary: opacityDictionary) - let colorDictionary: [String: Any] = try dictionary.value(for: CodingKeys.color) - color = try KeyframeGroup(dictionary: colorDictionary) - if - let fillRuleRawValue = dictionary[CodingKeys.fillRule.rawValue] as? Int, - let fillRule = FillRule(rawValue: fillRuleRawValue) - { - self.fillRule = fillRule - } else { - fillRule = .nonZeroWinding - } - try super.init(dictionary: dictionary) - } - - // MARK: Internal - - /// The opacity of the fill - let opacity: KeyframeGroup - - /// The color keyframes for the fill - let color: KeyframeGroup - - /// The fill rule to use when filling a path - let fillRule: FillRule - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(opacity, forKey: .opacity) - try container.encode(color, forKey: .color) - try container.encode(fillRule, forKey: .fillRule) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case opacity = "o" - case color = "c" - case fillRule = "r" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/GradientFill.swift b/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/GradientFill.swift deleted file mode 100644 index 71d1856..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/GradientFill.swift +++ /dev/null @@ -1,137 +0,0 @@ -// -// GradientFill.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -// MARK: - GradientType - -enum GradientType: Int, Codable { - case none - case linear - case radial -} - -// MARK: - GradientFill - -final class GradientFill: ShapeItem { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: GradientFill.CodingKeys.self) - opacity = try container.decode(KeyframeGroup.self, forKey: .opacity) - startPoint = try container.decode(KeyframeGroup.self, forKey: .startPoint) - endPoint = try container.decode(KeyframeGroup.self, forKey: .endPoint) - gradientType = try container.decode(GradientType.self, forKey: .gradientType) - highlightLength = try container.decodeIfPresent(KeyframeGroup.self, forKey: .highlightLength) - highlightAngle = try container.decodeIfPresent(KeyframeGroup.self, forKey: .highlightAngle) - fillRule = try container.decodeIfPresent(FillRule.self, forKey: .fillRule) ?? .nonZeroWinding - let colorsContainer = try container.nestedContainer(keyedBy: GradientDataKeys.self, forKey: .colors) - colors = try colorsContainer.decode(KeyframeGroup<[Double]>.self, forKey: .colors) - numberOfColors = try colorsContainer.decode(Int.self, forKey: .numberOfColors) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - let opacityDictionary: [String: Any] = try dictionary.value(for: CodingKeys.opacity) - opacity = try KeyframeGroup(dictionary: opacityDictionary) - let startPointDictionary: [String: Any] = try dictionary.value(for: CodingKeys.startPoint) - startPoint = try KeyframeGroup(dictionary: startPointDictionary) - let endPointDictionary: [String: Any] = try dictionary.value(for: CodingKeys.endPoint) - endPoint = try KeyframeGroup(dictionary: endPointDictionary) - let gradientRawType: Int = try dictionary.value(for: CodingKeys.gradientType) - guard let gradient = GradientType(rawValue: gradientRawType) else { - throw InitializableError.invalidInput - } - gradientType = gradient - if let highlightLengthDictionary = dictionary[CodingKeys.highlightLength.rawValue] as? [String: Any] { - highlightLength = try? KeyframeGroup(dictionary: highlightLengthDictionary) - } else { - highlightLength = nil - } - if let highlightAngleDictionary = dictionary[CodingKeys.highlightAngle.rawValue] as? [String: Any] { - highlightAngle = try? KeyframeGroup(dictionary: highlightAngleDictionary) - } else { - highlightAngle = nil - } - let colorsDictionary: [String: Any] = try dictionary.value(for: CodingKeys.colors) - let nestedColorsDictionary: [String: Any] = try colorsDictionary.value(for: GradientDataKeys.colors) - colors = try KeyframeGroup<[Double]>(dictionary: nestedColorsDictionary) - numberOfColors = try colorsDictionary.value(for: GradientDataKeys.numberOfColors) - if - let fillRuleRawValue = dictionary[CodingKeys.fillRule.rawValue] as? Int, - let fillRule = FillRule(rawValue: fillRuleRawValue) - { - self.fillRule = fillRule - } else { - fillRule = .nonZeroWinding - } - try super.init(dictionary: dictionary) - } - - // MARK: Internal - - /// The opacity of the fill - let opacity: KeyframeGroup - - /// The start of the gradient - let startPoint: KeyframeGroup - - /// The end of the gradient - let endPoint: KeyframeGroup - - /// The type of gradient - let gradientType: GradientType - - /// Gradient Highlight Length. Only if type is Radial - let highlightLength: KeyframeGroup? - - /// Highlight Angle. Only if type is Radial - let highlightAngle: KeyframeGroup? - - /// The number of color points in the gradient - let numberOfColors: Int - - /// The Colors of the gradient. - let colors: KeyframeGroup<[Double]> - - /// The fill rule to use when filling a path - let fillRule: FillRule - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(opacity, forKey: .opacity) - try container.encode(startPoint, forKey: .startPoint) - try container.encode(endPoint, forKey: .endPoint) - try container.encode(gradientType, forKey: .gradientType) - try container.encodeIfPresent(highlightLength, forKey: .highlightLength) - try container.encodeIfPresent(highlightAngle, forKey: .highlightAngle) - try container.encodeIfPresent(fillRule, forKey: .fillRule) - var colorsContainer = container.nestedContainer(keyedBy: GradientDataKeys.self, forKey: .colors) - try colorsContainer.encode(numberOfColors, forKey: .numberOfColors) - try colorsContainer.encode(colors, forKey: .colors) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case opacity = "o" - case startPoint = "s" - case endPoint = "e" - case gradientType = "t" - case highlightLength = "h" - case highlightAngle = "a" - case colors = "g" - case fillRule = "r" - } - - private enum GradientDataKeys: String, CodingKey { - case numberOfColors = "p" - case colors = "k" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/GradientStroke.swift b/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/GradientStroke.swift deleted file mode 100644 index f29b1c6..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/GradientStroke.swift +++ /dev/null @@ -1,238 +0,0 @@ -// -// GradientStroke.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -// MARK: - LineCap - -enum LineCap: Int, Codable { - case none - case butt - case round - case square -} - -// MARK: - LineJoin - -enum LineJoin: Int, Codable { - case none - case miter - case round - case bevel -} - -// MARK: - GradientStroke - -final class GradientStroke: ShapeItem { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: GradientStroke.CodingKeys.self) - opacity = try container.decode(KeyframeGroup.self, forKey: .opacity) - startPoint = try container.decode(KeyframeGroup.self, forKey: .startPoint) - endPoint = try container.decode(KeyframeGroup.self, forKey: .endPoint) - gradientType = try container.decode(GradientType.self, forKey: .gradientType) - highlightLength = try container.decodeIfPresent(KeyframeGroup.self, forKey: .highlightLength) - highlightAngle = try container.decodeIfPresent(KeyframeGroup.self, forKey: .highlightAngle) - width = try container.decode(KeyframeGroup.self, forKey: .width) - lineCap = try container.decodeIfPresent(LineCap.self, forKey: .lineCap) ?? .round - lineJoin = try container.decodeIfPresent(LineJoin.self, forKey: .lineJoin) ?? .round - miterLimit = try container.decodeIfPresent(Double.self, forKey: .miterLimit) ?? 4 - // TODO Decode Color Objects instead of array. - let colorsContainer = try container.nestedContainer(keyedBy: GradientDataKeys.self, forKey: .colors) - colors = try colorsContainer.decode(KeyframeGroup<[Double]>.self, forKey: .colors) - numberOfColors = try colorsContainer.decode(Int.self, forKey: .numberOfColors) - dashPattern = try container.decodeIfPresent([DashElement].self, forKey: .dashPattern) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - let opacityDictionary: [String: Any] = try dictionary.value(for: CodingKeys.opacity) - opacity = try KeyframeGroup(dictionary: opacityDictionary) - let startPointDictionary: [String: Any] = try dictionary.value(for: CodingKeys.startPoint) - startPoint = try KeyframeGroup(dictionary: startPointDictionary) - let endPointDictionary: [String: Any] = try dictionary.value(for: CodingKeys.endPoint) - endPoint = try KeyframeGroup(dictionary: endPointDictionary) - let gradientRawType: Int = try dictionary.value(for: CodingKeys.gradientType) - guard let gradient = GradientType(rawValue: gradientRawType) else { - throw InitializableError.invalidInput - } - gradientType = gradient - if let highlightLengthDictionary = dictionary[CodingKeys.highlightLength.rawValue] as? [String: Any] { - highlightLength = try? KeyframeGroup(dictionary: highlightLengthDictionary) - } else { - highlightLength = nil - } - if let highlightAngleDictionary = dictionary[CodingKeys.highlightAngle.rawValue] as? [String: Any] { - highlightAngle = try? KeyframeGroup(dictionary: highlightAngleDictionary) - } else { - highlightAngle = nil - } - let widthDictionary: [String: Any] = try dictionary.value(for: CodingKeys.width) - width = try KeyframeGroup(dictionary: widthDictionary) - if - let lineCapRawValue = dictionary[CodingKeys.lineCap.rawValue] as? Int, - let lineCap = LineCap(rawValue: lineCapRawValue) - { - self.lineCap = lineCap - } else { - lineCap = .round - } - if - let lineJoinRawValue = dictionary[CodingKeys.lineJoin.rawValue] as? Int, - let lineJoin = LineJoin(rawValue: lineJoinRawValue) - { - self.lineJoin = lineJoin - } else { - lineJoin = .round - } - miterLimit = (try? dictionary.value(for: CodingKeys.miterLimit)) ?? 4 - let colorsDictionary: [String: Any] = try dictionary.value(for: CodingKeys.colors) - let nestedColorsDictionary: [String: Any] = try colorsDictionary.value(for: GradientDataKeys.colors) - colors = try KeyframeGroup<[Double]>(dictionary: nestedColorsDictionary) - numberOfColors = try colorsDictionary.value(for: GradientDataKeys.numberOfColors) - let dashPatternDictionaries = dictionary[CodingKeys.dashPattern.rawValue] as? [[String: Any]] - dashPattern = try? dashPatternDictionaries?.map { try DashElement(dictionary: $0) } - try super.init(dictionary: dictionary) - } - - init( - name: String, - hidden: Bool, - opacity: KeyframeGroup, - startPoint: KeyframeGroup, - endPoint: KeyframeGroup, - gradientType: GradientType, - highlightLength: KeyframeGroup?, - highlightAngle: KeyframeGroup?, - numberOfColors: Int, - colors: KeyframeGroup<[Double]>, - width: KeyframeGroup, - lineCap: LineCap, - lineJoin: LineJoin, - miterLimit: Double, - dashPattern: [DashElement]?) - { - self.opacity = opacity - self.startPoint = startPoint - self.endPoint = endPoint - self.gradientType = gradientType - self.highlightLength = highlightLength - self.highlightAngle = highlightAngle - self.numberOfColors = numberOfColors - self.colors = colors - self.width = width - self.lineCap = lineCap - self.lineJoin = lineJoin - self.miterLimit = miterLimit - self.dashPattern = dashPattern - super.init(name: name, type: .gradientStroke, hidden: hidden) - } - - // MARK: Internal - - /// The opacity of the fill - let opacity: KeyframeGroup - - /// The start of the gradient - let startPoint: KeyframeGroup - - /// The end of the gradient - let endPoint: KeyframeGroup - - /// The type of gradient - let gradientType: GradientType - - /// Gradient Highlight Length. Only if type is Radial - let highlightLength: KeyframeGroup? - - /// Highlight Angle. Only if type is Radial - let highlightAngle: KeyframeGroup? - - /// The number of color points in the gradient - let numberOfColors: Int - - /// The Colors of the gradient. - let colors: KeyframeGroup<[Double]> - - /// The width of the stroke - let width: KeyframeGroup - - /// Line Cap - let lineCap: LineCap - - /// Line Join - let lineJoin: LineJoin - - /// Miter Limit - let miterLimit: Double - - /// The dash pattern of the stroke - let dashPattern: [DashElement]? - - /// Creates a copy of this GradientStroke with the given updated width keyframes - func copy(width newWidth: KeyframeGroup) -> GradientStroke { - GradientStroke( - name: name, - hidden: hidden, - opacity: opacity, - startPoint: startPoint, - endPoint: endPoint, - gradientType: gradientType, - highlightLength: highlightLength, - highlightAngle: highlightAngle, - numberOfColors: numberOfColors, - colors: colors, - width: newWidth, - lineCap: lineCap, - lineJoin: lineJoin, - miterLimit: miterLimit, - dashPattern: dashPattern) - } - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(opacity, forKey: .opacity) - try container.encode(startPoint, forKey: .startPoint) - try container.encode(endPoint, forKey: .endPoint) - try container.encode(gradientType, forKey: .gradientType) - try container.encodeIfPresent(highlightLength, forKey: .highlightLength) - try container.encodeIfPresent(highlightAngle, forKey: .highlightAngle) - try container.encode(width, forKey: .width) - try container.encode(lineCap, forKey: .lineCap) - try container.encode(lineJoin, forKey: .lineJoin) - try container.encode(miterLimit, forKey: .miterLimit) - var colorsContainer = container.nestedContainer(keyedBy: GradientDataKeys.self, forKey: .colors) - try colorsContainer.encode(numberOfColors, forKey: .numberOfColors) - try colorsContainer.encode(colors, forKey: .colors) - try container.encodeIfPresent(dashPattern, forKey: .dashPattern) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case opacity = "o" - case startPoint = "s" - case endPoint = "e" - case gradientType = "t" - case highlightLength = "h" - case highlightAngle = "a" - case colors = "g" - case width = "w" - case lineCap = "lc" - case lineJoin = "lj" - case miterLimit = "ml" - case dashPattern = "d" - } - - private enum GradientDataKeys: String, CodingKey { - case numberOfColors = "p" - case colors = "k" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Group.swift b/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Group.swift deleted file mode 100644 index e952109..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Group.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// GroupItem.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -/// An item that define a a group of shape items -final class Group: ShapeItem { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: Group.CodingKeys.self) - items = try container.decode([ShapeItem].self, ofFamily: ShapeType.self, forKey: .items) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - let itemDictionaries: [[String: Any]] = try dictionary.value(for: CodingKeys.items) - items = try [ShapeItem].fromDictionaries(itemDictionaries) - try super.init(dictionary: dictionary) - } - - init(items: [ShapeItem], name: String) { - self.items = items - super.init(name: name, type: .group, hidden: false) - } - - // MARK: Internal - - /// A list of shape items. - let items: [ShapeItem] - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(items, forKey: .items) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case items = "it" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Merge.swift b/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Merge.swift deleted file mode 100644 index 3b35e8b..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Merge.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// Merge.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -// MARK: - MergeMode - -enum MergeMode: Int, Codable { - case none - case merge - case add - case subtract - case intersect - case exclude -} - -// MARK: - Merge - -final class Merge: ShapeItem { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: Merge.CodingKeys.self) - mode = try container.decode(MergeMode.self, forKey: .mode) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - let modeRawType: Int = try dictionary.value(for: CodingKeys.mode) - guard let mode = MergeMode(rawValue: modeRawType) else { - throw InitializableError.invalidInput - } - self.mode = mode - try super.init(dictionary: dictionary) - } - - // MARK: Internal - - /// The mode of the merge path - let mode: MergeMode - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(mode, forKey: .mode) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case mode = "mm" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Rectangle.swift b/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Rectangle.swift deleted file mode 100644 index e268334..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Rectangle.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// Rectangle.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -final class Rectangle: ShapeItem { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: Rectangle.CodingKeys.self) - direction = try container.decodeIfPresent(PathDirection.self, forKey: .direction) ?? .clockwise - position = try container.decode(KeyframeGroup.self, forKey: .position) - size = try container.decode(KeyframeGroup.self, forKey: .size) - cornerRadius = try container.decode(KeyframeGroup.self, forKey: .cornerRadius) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - if - let directionRawType = dictionary[CodingKeys.direction.rawValue] as? Int, - let direction = PathDirection(rawValue: directionRawType) - { - self.direction = direction - } else { - direction = .clockwise - } - let positionDictionary: [String: Any] = try dictionary.value(for: CodingKeys.position) - position = try KeyframeGroup(dictionary: positionDictionary) - let sizeDictionary: [String: Any] = try dictionary.value(for: CodingKeys.size) - size = try KeyframeGroup(dictionary: sizeDictionary) - let cornerRadiusDictionary: [String: Any] = try dictionary.value(for: CodingKeys.cornerRadius) - cornerRadius = try KeyframeGroup(dictionary: cornerRadiusDictionary) - try super.init(dictionary: dictionary) - } - - // MARK: Internal - - /// The direction of the rect. - let direction: PathDirection - - /// The position - let position: KeyframeGroup - - /// The size - let size: KeyframeGroup - - /// The Corner radius of the rectangle - let cornerRadius: KeyframeGroup - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(direction, forKey: .direction) - try container.encode(position, forKey: .position) - try container.encode(size, forKey: .size) - try container.encode(cornerRadius, forKey: .cornerRadius) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case direction = "d" - case position = "p" - case size = "s" - case cornerRadius = "r" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Repeater.swift b/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Repeater.swift deleted file mode 100644 index 0980ebd..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Repeater.swift +++ /dev/null @@ -1,174 +0,0 @@ -// -// Repeater.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -final class Repeater: ShapeItem { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: Repeater.CodingKeys.self) - copies = try container - .decodeIfPresent(KeyframeGroup.self, forKey: .copies) ?? KeyframeGroup(LottieVector1D(0)) - offset = try container - .decodeIfPresent(KeyframeGroup.self, forKey: .offset) ?? KeyframeGroup(LottieVector1D(0)) - let transformContainer = try container.nestedContainer(keyedBy: TransformKeys.self, forKey: .transform) - startOpacity = try transformContainer - .decodeIfPresent(KeyframeGroup.self, forKey: .startOpacity) ?? KeyframeGroup(LottieVector1D(100)) - endOpacity = try transformContainer - .decodeIfPresent(KeyframeGroup.self, forKey: .endOpacity) ?? KeyframeGroup(LottieVector1D(100)) - if let rotation = try transformContainer.decodeIfPresent(KeyframeGroup.self, forKey: .rotation) { - rotationZ = rotation - } else if let rotation = try transformContainer.decodeIfPresent(KeyframeGroup.self, forKey: .rotationZ) { - rotationZ = rotation - } else { - rotationZ = KeyframeGroup(LottieVector1D(0)) - } - - rotationX = try transformContainer - .decodeIfPresent(KeyframeGroup.self, forKey: .rotationX) ?? KeyframeGroup(LottieVector1D(0)) - rotationY = try transformContainer - .decodeIfPresent(KeyframeGroup.self, forKey: .rotationY) ?? KeyframeGroup(LottieVector1D(0)) - - position = try transformContainer - .decodeIfPresent(KeyframeGroup.self, forKey: .position) ?? - KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0)) - anchorPoint = try transformContainer - .decodeIfPresent(KeyframeGroup.self, forKey: .anchorPoint) ?? - KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0)) - scale = try transformContainer - .decodeIfPresent(KeyframeGroup.self, forKey: .scale) ?? - KeyframeGroup(LottieVector3D(x: Double(100), y: 100, z: 100)) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - if let copiesDictionary = dictionary[CodingKeys.copies.rawValue] as? [String: Any] { - copies = try KeyframeGroup(dictionary: copiesDictionary) - } else { - copies = KeyframeGroup(LottieVector1D(0)) - } - if let offsetDictionary = dictionary[CodingKeys.offset.rawValue] as? [String: Any] { - offset = try KeyframeGroup(dictionary: offsetDictionary) - } else { - offset = KeyframeGroup(LottieVector1D(0)) - } - let transformDictionary: [String: Any] = try dictionary.value(for: CodingKeys.transform) - if let startOpacityDictionary = transformDictionary[TransformKeys.startOpacity.rawValue] as? [String: Any] { - startOpacity = try KeyframeGroup(dictionary: startOpacityDictionary) - } else { - startOpacity = KeyframeGroup(LottieVector1D(100)) - } - if let endOpacityDictionary = transformDictionary[TransformKeys.endOpacity.rawValue] as? [String: Any] { - endOpacity = try KeyframeGroup(dictionary: endOpacityDictionary) - } else { - endOpacity = KeyframeGroup(LottieVector1D(100)) - } - if let rotationDictionary = transformDictionary[TransformKeys.rotationX.rawValue] as? [String: Any] { - rotationX = try KeyframeGroup(dictionary: rotationDictionary) - } else { - rotationX = KeyframeGroup(LottieVector1D(0)) - } - if let rotationDictionary = transformDictionary[TransformKeys.rotationY.rawValue] as? [String: Any] { - rotationY = try KeyframeGroup(dictionary: rotationDictionary) - } else { - rotationY = KeyframeGroup(LottieVector1D(0)) - } - if let rotationDictionary = transformDictionary[TransformKeys.rotation.rawValue] as? [String: Any] { - rotationZ = try KeyframeGroup(dictionary: rotationDictionary) - } else if let rotationDictionary = transformDictionary[TransformKeys.rotationZ.rawValue] as? [String: Any] { - rotationZ = try KeyframeGroup(dictionary: rotationDictionary) - } else { - rotationZ = KeyframeGroup(LottieVector1D(0)) - } - if let positionDictionary = transformDictionary[TransformKeys.position.rawValue] as? [String: Any] { - position = try KeyframeGroup(dictionary: positionDictionary) - } else { - position = KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0)) - } - if let anchorPointDictionary = transformDictionary[TransformKeys.anchorPoint.rawValue] as? [String: Any] { - anchorPoint = try KeyframeGroup(dictionary: anchorPointDictionary) - } else { - anchorPoint = KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0)) - } - if let scaleDictionary = transformDictionary[TransformKeys.scale.rawValue] as? [String: Any] { - scale = try KeyframeGroup(dictionary: scaleDictionary) - } else { - scale = KeyframeGroup(LottieVector3D(x: Double(100), y: 100, z: 100)) - } - try super.init(dictionary: dictionary) - } - - // MARK: Internal - - /// The number of copies to repeat - let copies: KeyframeGroup - - /// The offset of each copy - let offset: KeyframeGroup - - /// Start Opacity - let startOpacity: KeyframeGroup - - /// End opacity - let endOpacity: KeyframeGroup - - /// The rotation on X axis - let rotationX: KeyframeGroup - - /// The rotation on Y axis - let rotationY: KeyframeGroup - - /// The rotation on Z axis - let rotationZ: KeyframeGroup - - /// Anchor Point - let anchorPoint: KeyframeGroup - - /// Position - let position: KeyframeGroup - - /// Scale - let scale: KeyframeGroup - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(copies, forKey: .copies) - try container.encode(offset, forKey: .offset) - var transformContainer = container.nestedContainer(keyedBy: TransformKeys.self, forKey: .transform) - try transformContainer.encode(startOpacity, forKey: .startOpacity) - try transformContainer.encode(endOpacity, forKey: .endOpacity) - try transformContainer.encode(rotationX, forKey: .rotationX) - try transformContainer.encode(rotationY, forKey: .rotationY) - try transformContainer.encode(rotationZ, forKey: .rotationZ) - try transformContainer.encode(position, forKey: .position) - try transformContainer.encode(anchorPoint, forKey: .anchorPoint) - try transformContainer.encode(scale, forKey: .scale) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case copies = "c" - case offset = "o" - case transform = "tr" - } - - private enum TransformKeys: String, CodingKey { - case rotation = "r" - case rotationX = "rx" - case rotationY = "ry" - case rotationZ = "rz" - case startOpacity = "so" - case endOpacity = "eo" - case anchorPoint = "a" - case position = "p" - case scale = "s" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/RoundedCorners.swift b/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/RoundedCorners.swift deleted file mode 100644 index e2c1b68..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/RoundedCorners.swift +++ /dev/null @@ -1,47 +0,0 @@ -// -// RoundedCorners.swift -// Lottie -// -// Created by Duolingo on 10/31/22. -// - -import Foundation - -// MARK: - RoundedCorners - -final class RoundedCorners: ShapeItem { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: RoundedCorners.CodingKeys.self) - radius = try - container.decode( - KeyframeGroup.self, - forKey: .radius) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - let radiusDictionary: [String: Any] = try dictionary.value(for: CodingKeys.radius) - radius = try KeyframeGroup(dictionary: radiusDictionary) - try super.init(dictionary: dictionary) - } - - // MARK: Internal - - /// The radius of rounded corners - let radius: KeyframeGroup - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(radius, forKey: .radius) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case radius = "r" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Shape.swift b/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Shape.swift deleted file mode 100644 index c1eeb66..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Shape.swift +++ /dev/null @@ -1,56 +0,0 @@ -// -// VectorShape.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -/// An item that defines an custom shape -final class Shape: ShapeItem { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: Shape.CodingKeys.self) - path = try container.decode(KeyframeGroup.self, forKey: .path) - direction = try container.decodeIfPresent(PathDirection.self, forKey: .direction) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - let pathDictionary: [String: Any] = try dictionary.value(for: CodingKeys.path) - path = try KeyframeGroup(dictionary: pathDictionary) - if - let directionRawValue = dictionary[CodingKeys.direction.rawValue] as? Int, - let direction = PathDirection(rawValue: directionRawValue) - { - self.direction = direction - } else { - direction = nil - } - try super.init(dictionary: dictionary) - } - - // MARK: Internal - - /// The Path - let path: KeyframeGroup - - let direction: PathDirection? - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(path, forKey: .path) - try container.encodeIfPresent(direction, forKey: .direction) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case path = "ks" - case direction = "d" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/ShapeItem.swift b/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/ShapeItem.swift deleted file mode 100644 index a22f50b..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/ShapeItem.swift +++ /dev/null @@ -1,167 +0,0 @@ -// -// ShapeItem.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -// MARK: - ShapeType + ClassFamily - -/// Used for mapping a heterogeneous list to classes for parsing. -extension ShapeType: ClassFamily { - - static var discriminator: Discriminator = .type - - func getType() -> AnyObject.Type { - switch self { - case .ellipse: - return Ellipse.self - case .fill: - return Fill.self - case .gradientFill: - return GradientFill.self - case .group: - return Group.self - case .gradientStroke: - return GradientStroke.self - case .merge: - return Merge.self - case .rectangle: - return Rectangle.self - case .repeater: - return Repeater.self - case .round: - return RoundedCorners.self - case .shape: - return Shape.self - case .star: - return Star.self - case .stroke: - return Stroke.self - case .trim: - return Trim.self - case .transform: - return ShapeTransform.self - default: - return ShapeItem.self - } - } -} - -// MARK: - ShapeType - -enum ShapeType: String, Codable { - case ellipse = "el" - case fill = "fl" - case gradientFill = "gf" - case group = "gr" - case gradientStroke = "gs" - case merge = "mm" - case rectangle = "rc" - case repeater = "rp" - case round = "rd" - case shape = "sh" - case star = "sr" - case stroke = "st" - case trim = "tm" - case transform = "tr" - case unknown - - public init(from decoder: Decoder) throws { - self = try ShapeType(rawValue: decoder.singleValueContainer().decode(RawValue.self)) ?? .unknown - } -} - -// MARK: - ShapeItem - -/// An item belonging to a Shape Layer -class ShapeItem: Codable, DictionaryInitializable { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: ShapeItem.CodingKeys.self) - name = try container.decodeIfPresent(String.self, forKey: .name) ?? "Layer" - type = try container.decode(ShapeType.self, forKey: .type) - hidden = try container.decodeIfPresent(Bool.self, forKey: .hidden) ?? false - } - - required init(dictionary: [String: Any]) throws { - name = (try? dictionary.value(for: CodingKeys.name)) ?? "Layer" - type = ShapeType(rawValue: try dictionary.value(for: CodingKeys.type)) ?? .unknown - hidden = (try? dictionary.value(for: CodingKeys.hidden)) ?? false - } - - init( - name: String, - type: ShapeType, - hidden: Bool) - { - self.name = name - self.type = type - self.hidden = hidden - } - - // MARK: Internal - - /// The name of the shape - let name: String - - /// The type of shape - let type: ShapeType - - let hidden: Bool - - // MARK: Fileprivate - - fileprivate enum CodingKeys: String, CodingKey { - case name = "nm" - case type = "ty" - case hidden = "hd" - } -} - -extension Array where Element == ShapeItem { - - static func fromDictionaries(_ dictionaries: [[String: Any]]) throws -> [ShapeItem] { - try dictionaries.compactMap { dictionary in - let shapeType = dictionary[ShapeItem.CodingKeys.type.rawValue] as? String - switch ShapeType(rawValue: shapeType ?? ShapeType.unknown.rawValue) { - case .ellipse: - return try Ellipse(dictionary: dictionary) - case .fill: - return try Fill(dictionary: dictionary) - case .gradientFill: - return try GradientFill(dictionary: dictionary) - case .group: - return try Group(dictionary: dictionary) - case .gradientStroke: - return try GradientStroke(dictionary: dictionary) - case .merge: - return try Merge(dictionary: dictionary) - case .rectangle: - return try Rectangle(dictionary: dictionary) - case .repeater: - return try Repeater(dictionary: dictionary) - case .round: - return try RoundedCorners(dictionary: dictionary) - case .shape: - return try Shape(dictionary: dictionary) - case .star: - return try Star(dictionary: dictionary) - case .stroke: - return try Stroke(dictionary: dictionary) - case .trim: - return try Trim(dictionary: dictionary) - case .transform: - return try ShapeTransform(dictionary: dictionary) - case .none: - return nil - default: - return try ShapeItem(dictionary: dictionary) - } - } - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/ShapeTransform.swift b/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/ShapeTransform.swift deleted file mode 100644 index c6790d2..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/ShapeTransform.swift +++ /dev/null @@ -1,204 +0,0 @@ -// -// TransformItem.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -final class ShapeTransform: ShapeItem { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: ShapeTransform.CodingKeys.self) - anchor = try container - .decodeIfPresent(KeyframeGroup.self, forKey: .anchor) ?? - KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0)) - position = try container - .decodeIfPresent(KeyframeGroup.self, forKey: .position) ?? - KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0)) - scale = try container - .decodeIfPresent(KeyframeGroup.self, forKey: .scale) ?? - KeyframeGroup(LottieVector3D(x: Double(100), y: 100, z: 100)) - - rotationX = try container - .decodeIfPresent(KeyframeGroup.self, forKey: .rotationX) ?? KeyframeGroup(LottieVector1D(0)) - rotationY = try container - .decodeIfPresent(KeyframeGroup.self, forKey: .rotationY) ?? KeyframeGroup(LottieVector1D(0)) - if - let rotation = try container - .decodeIfPresent(KeyframeGroup.self, forKey: .rotation) - { - rotationZ = rotation - } else if - let rotation = try container - .decodeIfPresent(KeyframeGroup.self, forKey: .rotationZ) - { - rotationZ = rotation - } else { - rotationZ = KeyframeGroup(LottieVector1D(0)) - } - - opacity = try container - .decodeIfPresent(KeyframeGroup.self, forKey: .opacity) ?? KeyframeGroup(LottieVector1D(100)) - skew = try container.decodeIfPresent(KeyframeGroup.self, forKey: .skew) ?? KeyframeGroup(LottieVector1D(0)) - skewAxis = try container - .decodeIfPresent(KeyframeGroup.self, forKey: .skewAxis) ?? KeyframeGroup(LottieVector1D(0)) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - if - let anchorDictionary = dictionary[CodingKeys.anchor.rawValue] as? [String: Any], - let anchor = try? KeyframeGroup(dictionary: anchorDictionary) - { - self.anchor = anchor - } else { - anchor = KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0)) - } - if - let positionDictionary = dictionary[CodingKeys.position.rawValue] as? [String: Any], - let position = try? KeyframeGroup(dictionary: positionDictionary) - { - self.position = position - } else { - position = KeyframeGroup(LottieVector3D(x: Double(0), y: 0, z: 0)) - } - if - let scaleDictionary = dictionary[CodingKeys.scale.rawValue] as? [String: Any], - let scale = try? KeyframeGroup(dictionary: scaleDictionary) - { - self.scale = scale - } else { - scale = KeyframeGroup(LottieVector3D(x: Double(100), y: 100, z: 100)) - } - - if - let rotationDictionary = dictionary[CodingKeys.rotationX.rawValue] as? [String: Any], - let rotation = try? KeyframeGroup(dictionary: rotationDictionary) - { - rotationX = rotation - } else { - rotationX = KeyframeGroup(LottieVector1D(0)) - } - - if - let rotationDictionary = dictionary[CodingKeys.rotationY.rawValue] as? [String: Any], - let rotation = try? KeyframeGroup(dictionary: rotationDictionary) - { - rotationY = rotation - } else { - rotationY = KeyframeGroup(LottieVector1D(0)) - } - - if - let rotationDictionary = dictionary[CodingKeys.rotation.rawValue] as? [String: Any], - let rotation = try? KeyframeGroup(dictionary: rotationDictionary) - { - rotationZ = rotation - } else if - let rotationDictionary = dictionary[CodingKeys.rotationZ.rawValue] as? [String: Any], - let rotation = try? KeyframeGroup(dictionary: rotationDictionary) - { - rotationZ = rotation - } else { - rotationZ = KeyframeGroup(LottieVector1D(0)) - } - - if - let opacityDictionary = dictionary[CodingKeys.opacity.rawValue] as? [String: Any], - let opacity = try? KeyframeGroup(dictionary: opacityDictionary) - { - self.opacity = opacity - } else { - opacity = KeyframeGroup(LottieVector1D(100)) - } - if - let skewDictionary = dictionary[CodingKeys.skew.rawValue] as? [String: Any], - let skew = try? KeyframeGroup(dictionary: skewDictionary) - { - self.skew = skew - } else { - skew = KeyframeGroup(LottieVector1D(0)) - } - if - let skewAxisDictionary = dictionary[CodingKeys.skewAxis.rawValue] as? [String: Any], - let skewAxis = try? KeyframeGroup(dictionary: skewAxisDictionary) - { - self.skewAxis = skewAxis - } else { - skewAxis = KeyframeGroup(LottieVector1D(0)) - } - - try super.init(dictionary: dictionary) - } - - // MARK: Internal - - /// Anchor Point - let anchor: KeyframeGroup - - /// Position - let position: KeyframeGroup - - /// Scale - let scale: KeyframeGroup - - /// Rotation on X axis - let rotationX: KeyframeGroup - - /// Rotation on Y axis - let rotationY: KeyframeGroup - - /// Rotation on Z axis - let rotationZ: KeyframeGroup - - /// opacity - let opacity: KeyframeGroup - - /// Skew - let skew: KeyframeGroup - - /// Skew Axis - let skewAxis: KeyframeGroup - - /// Whether or not this transform has a non-zero skew value - var hasSkew: Bool { - guard !skew.keyframes.isEmpty, !skewAxis.keyframes.isEmpty else { - return false - } - - return skew.keyframes.contains(where: { $0.value.cgFloatValue != 0 }) - } - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(anchor, forKey: .anchor) - try container.encode(position, forKey: .position) - try container.encode(scale, forKey: .scale) - try container.encode(rotationX, forKey: .rotationX) - try container.encode(rotationY, forKey: .rotationY) - try container.encode(rotationZ, forKey: .rotationZ) - try container.encode(opacity, forKey: .opacity) - try container.encode(skew, forKey: .skew) - try container.encode(skewAxis, forKey: .skewAxis) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case anchor = "a" - case position = "p" - case scale = "s" - case rotation = "r" - case rotationX = "rx" - case rotationY = "ry" - case rotationZ = "rz" - case opacity = "o" - case skew = "sk" - case skewAxis = "sa" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Star.swift b/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Star.swift deleted file mode 100644 index e13e47a..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Star.swift +++ /dev/null @@ -1,131 +0,0 @@ -// -// Star.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -// MARK: - StarType - -enum StarType: Int, Codable { - case none - case star - case polygon -} - -// MARK: - Star - -final class Star: ShapeItem { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: Star.CodingKeys.self) - direction = try container.decodeIfPresent(PathDirection.self, forKey: .direction) ?? .clockwise - position = try container.decode(KeyframeGroup.self, forKey: .position) - outerRadius = try container.decode(KeyframeGroup.self, forKey: .outerRadius) - outerRoundness = try container.decode(KeyframeGroup.self, forKey: .outerRoundness) - innerRadius = try container.decodeIfPresent(KeyframeGroup.self, forKey: .innerRadius) - innerRoundness = try container.decodeIfPresent(KeyframeGroup.self, forKey: .innerRoundness) - rotation = try container.decode(KeyframeGroup.self, forKey: .rotation) - points = try container.decode(KeyframeGroup.self, forKey: .points) - starType = try container.decode(StarType.self, forKey: .starType) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - if - let directionRawValue = dictionary[CodingKeys.direction.rawValue] as? Int, - let direction = PathDirection(rawValue: directionRawValue) - { - self.direction = direction - } else { - direction = .clockwise - } - let positionDictionary: [String: Any] = try dictionary.value(for: CodingKeys.position) - position = try KeyframeGroup(dictionary: positionDictionary) - let outerRadiusDictionary: [String: Any] = try dictionary.value(for: CodingKeys.outerRadius) - outerRadius = try KeyframeGroup(dictionary: outerRadiusDictionary) - let outerRoundnessDictionary: [String: Any] = try dictionary.value(for: CodingKeys.outerRoundness) - outerRoundness = try KeyframeGroup(dictionary: outerRoundnessDictionary) - if let innerRadiusDictionary = dictionary[CodingKeys.innerRadius.rawValue] as? [String: Any] { - innerRadius = try KeyframeGroup(dictionary: innerRadiusDictionary) - } else { - innerRadius = nil - } - if let innerRoundnessDictionary = dictionary[CodingKeys.innerRoundness.rawValue] as? [String: Any] { - innerRoundness = try KeyframeGroup(dictionary: innerRoundnessDictionary) - } else { - innerRoundness = nil - } - let rotationDictionary: [String: Any] = try dictionary.value(for: CodingKeys.rotation) - rotation = try KeyframeGroup(dictionary: rotationDictionary) - let pointsDictionary: [String: Any] = try dictionary.value(for: CodingKeys.points) - points = try KeyframeGroup(dictionary: pointsDictionary) - let starTypeRawValue: Int = try dictionary.value(for: CodingKeys.starType) - guard let starType = StarType(rawValue: starTypeRawValue) else { - throw InitializableError.invalidInput - } - self.starType = starType - try super.init(dictionary: dictionary) - } - - // MARK: Internal - - /// The direction of the star. - let direction: PathDirection - - /// The position of the star - let position: KeyframeGroup - - /// The outer radius of the star - let outerRadius: KeyframeGroup - - /// The outer roundness of the star - let outerRoundness: KeyframeGroup - - /// The outer radius of the star - let innerRadius: KeyframeGroup? - - /// The outer roundness of the star - let innerRoundness: KeyframeGroup? - - /// The rotation of the star - let rotation: KeyframeGroup - - /// The number of points on the star - let points: KeyframeGroup - - /// The type of star - let starType: StarType - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(direction, forKey: .direction) - try container.encode(position, forKey: .position) - try container.encode(outerRadius, forKey: .outerRadius) - try container.encode(outerRoundness, forKey: .outerRoundness) - try container.encode(innerRadius, forKey: .innerRadius) - try container.encode(innerRoundness, forKey: .innerRoundness) - try container.encode(rotation, forKey: .rotation) - try container.encode(points, forKey: .points) - try container.encode(starType, forKey: .starType) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case direction = "d" - case position = "p" - case outerRadius = "or" - case outerRoundness = "os" - case innerRadius = "ir" - case innerRoundness = "is" - case rotation = "r" - case points = "pt" - case starType = "sy" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Stroke.swift b/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Stroke.swift deleted file mode 100644 index 87a1728..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Stroke.swift +++ /dev/null @@ -1,136 +0,0 @@ -// -// Stroke.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -final class Stroke: ShapeItem { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: Stroke.CodingKeys.self) - opacity = try container.decode(KeyframeGroup.self, forKey: .opacity) - color = try container.decode(KeyframeGroup.self, forKey: .color) - width = try container.decode(KeyframeGroup.self, forKey: .width) - lineCap = try container.decodeIfPresent(LineCap.self, forKey: .lineCap) ?? .round - lineJoin = try container.decodeIfPresent(LineJoin.self, forKey: .lineJoin) ?? .round - miterLimit = try container.decodeIfPresent(Double.self, forKey: .miterLimit) ?? 4 - dashPattern = try container.decodeIfPresent([DashElement].self, forKey: .dashPattern) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - let opacityDictionary: [String: Any] = try dictionary.value(for: CodingKeys.opacity) - opacity = try KeyframeGroup(dictionary: opacityDictionary) - let colorDictionary: [String: Any] = try dictionary.value(for: CodingKeys.color) - color = try KeyframeGroup(dictionary: colorDictionary) - let widthDictionary: [String: Any] = try dictionary.value(for: CodingKeys.width) - width = try KeyframeGroup(dictionary: widthDictionary) - if - let lineCapRawValue = dictionary[CodingKeys.lineCap.rawValue] as? Int, - let lineCap = LineCap(rawValue: lineCapRawValue) - { - self.lineCap = lineCap - } else { - lineCap = .round - } - if - let lineJoinRawValue = dictionary[CodingKeys.lineJoin.rawValue] as? Int, - let lineJoin = LineJoin(rawValue: lineJoinRawValue) - { - self.lineJoin = lineJoin - } else { - lineJoin = .round - } - miterLimit = (try? dictionary.value(for: CodingKeys.miterLimit)) ?? 4 - let dashPatternDictionaries = dictionary[CodingKeys.dashPattern.rawValue] as? [[String: Any]] - dashPattern = try? dashPatternDictionaries?.map { try DashElement(dictionary: $0) } - try super.init(dictionary: dictionary) - } - - init( - name: String, - hidden: Bool, - opacity: KeyframeGroup, - color: KeyframeGroup, - width: KeyframeGroup, - lineCap: LineCap, - lineJoin: LineJoin, - miterLimit: Double, - dashPattern: [DashElement]?) - { - self.opacity = opacity - self.color = color - self.width = width - self.lineCap = lineCap - self.lineJoin = lineJoin - self.miterLimit = miterLimit - self.dashPattern = dashPattern - super.init(name: name, type: .stroke, hidden: hidden) - } - - // MARK: Internal - - /// The opacity of the stroke - let opacity: KeyframeGroup - - /// The Color of the stroke - let color: KeyframeGroup - - /// The width of the stroke - let width: KeyframeGroup - - /// Line Cap - let lineCap: LineCap - - /// Line Join - let lineJoin: LineJoin - - /// Miter Limit - let miterLimit: Double - - /// The dash pattern of the stroke - let dashPattern: [DashElement]? - - /// Creates a copy of this Stroke with the given updated width keyframes - func copy(width newWidth: KeyframeGroup) -> Stroke { - Stroke( - name: name, - hidden: hidden, - opacity: opacity, - color: color, - width: newWidth, - lineCap: lineCap, - lineJoin: lineJoin, - miterLimit: miterLimit, - dashPattern: dashPattern) - } - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(opacity, forKey: .opacity) - try container.encode(color, forKey: .color) - try container.encode(width, forKey: .width) - try container.encode(lineCap, forKey: .lineCap) - try container.encode(lineJoin, forKey: .lineJoin) - try container.encode(miterLimit, forKey: .miterLimit) - try container.encodeIfPresent(dashPattern, forKey: .dashPattern) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case opacity = "o" - case color = "c" - case width = "w" - case lineCap = "lc" - case lineJoin = "lj" - case miterLimit = "ml" - case dashPattern = "d" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Trim.swift b/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Trim.swift deleted file mode 100644 index aaa6ce4..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/ShapeItems/Trim.swift +++ /dev/null @@ -1,85 +0,0 @@ -// -// Trim.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import Foundation - -// MARK: - TrimType - -enum TrimType: Int, Codable { - case simultaneously = 1 - case individually = 2 -} - -// MARK: - Trim - -final class Trim: ShapeItem { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: Trim.CodingKeys.self) - start = try container.decode(KeyframeGroup.self, forKey: .start) - end = try container.decode(KeyframeGroup.self, forKey: .end) - offset = try container.decode(KeyframeGroup.self, forKey: .offset) - trimType = try container.decode(TrimType.self, forKey: .trimType) - try super.init(from: decoder) - } - - required init(dictionary: [String: Any]) throws { - let startDictionary: [String: Any] = try dictionary.value(for: CodingKeys.start) - start = try KeyframeGroup(dictionary: startDictionary) - let endDictionary: [String: Any] = try dictionary.value(for: CodingKeys.end) - end = try KeyframeGroup(dictionary: endDictionary) - let offsetDictionary: [String: Any] = try dictionary.value(for: CodingKeys.offset) - offset = try KeyframeGroup(dictionary: offsetDictionary) - let trimTypeRawValue: Int = try dictionary.value(for: CodingKeys.trimType) - guard let trimType = TrimType(rawValue: trimTypeRawValue) else { - throw InitializableError.invalidInput - } - self.trimType = trimType - try super.init(dictionary: dictionary) - } - - // MARK: Internal - - /// The start of the trim - let start: KeyframeGroup - - /// The end of the trim - let end: KeyframeGroup - - /// The offset of the trim - let offset: KeyframeGroup - - let trimType: TrimType - - /// If this trim doesn't affect the path at all then we can consider it empty - var isEmpty: Bool { - start.keyframes.count == 1 - && start.keyframes[0].value.value == 0 - && end.keyframes.count == 1 - && end.keyframes[0].value.value == 100 - } - - override func encode(to encoder: Encoder) throws { - try super.encode(to: encoder) - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(start, forKey: .start) - try container.encode(end, forKey: .end) - try container.encode(offset, forKey: .offset) - try container.encode(trimType, forKey: .trimType) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case start = "s" - case end = "e" - case offset = "o" - case trimType = "m" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Text/Font.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Text/Font.swift deleted file mode 100644 index c1c9869..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Text/Font.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// Font.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/9/19. -// - -import Foundation - -// MARK: - Font - -final class Font: Codable, DictionaryInitializable { - - // MARK: Lifecycle - - init(dictionary: [String: Any]) throws { - name = try dictionary.value(for: CodingKeys.name) - familyName = try dictionary.value(for: CodingKeys.familyName) - style = try dictionary.value(for: CodingKeys.style) - ascent = try dictionary.value(for: CodingKeys.ascent) - } - - // MARK: Internal - - let name: String - let familyName: String - let style: String - let ascent: Double - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case name = "fName" - case familyName = "fFamily" - case style = "fStyle" - case ascent - } - -} - -// MARK: - FontList - -/// A list of fonts -final class FontList: Codable, DictionaryInitializable { - - // MARK: Lifecycle - - init(dictionary: [String: Any]) throws { - let fontDictionaries: [[String: Any]] = try dictionary.value(for: CodingKeys.fonts) - fonts = try fontDictionaries.map { try Font(dictionary: $0) } - } - - // MARK: Internal - - enum CodingKeys: String, CodingKey { - case fonts = "list" - } - - let fonts: [Font] - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Text/Glyph.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Text/Glyph.swift deleted file mode 100644 index 03a7c58..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Text/Glyph.swift +++ /dev/null @@ -1,96 +0,0 @@ -// -// Glyph.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/9/19. -// - -import Foundation - -/// A model that holds a vector character -final class Glyph: Codable, DictionaryInitializable { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: Glyph.CodingKeys.self) - character = try container.decode(String.self, forKey: .character) - fontSize = try container.decode(Double.self, forKey: .fontSize) - fontFamily = try container.decode(String.self, forKey: .fontFamily) - fontStyle = try container.decode(String.self, forKey: .fontStyle) - width = try container.decode(Double.self, forKey: .width) - if - container.contains(.shapeWrapper), - let shapeContainer = try? container.nestedContainer(keyedBy: ShapeKey.self, forKey: .shapeWrapper), - shapeContainer.contains(.shapes) - { - shapes = try shapeContainer.decode([ShapeItem].self, ofFamily: ShapeType.self, forKey: .shapes) - } else { - shapes = [] - } - } - - init(dictionary: [String: Any]) throws { - character = try dictionary.value(for: CodingKeys.character) - fontSize = try dictionary.value(for: CodingKeys.fontSize) - fontFamily = try dictionary.value(for: CodingKeys.fontFamily) - fontStyle = try dictionary.value(for: CodingKeys.fontStyle) - width = try dictionary.value(for: CodingKeys.width) - if - let shapes = dictionary[CodingKeys.shapeWrapper.rawValue] as? [String: Any], - let shapeDictionaries = shapes[ShapeKey.shapes.rawValue] as? [[String: Any]] - { - self.shapes = try [ShapeItem].fromDictionaries(shapeDictionaries) - } else { - shapes = [ShapeItem]() - } - } - - // MARK: Internal - - /// The character - let character: String - - /// The font size of the character - let fontSize: Double - - /// The font family of the character - let fontFamily: String - - /// The Style of the character - let fontStyle: String - - /// The Width of the character - let width: Double - - /// The Shape Data of the Character - let shapes: [ShapeItem] - - func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - - try container.encode(character, forKey: .character) - try container.encode(fontSize, forKey: .fontSize) - try container.encode(fontFamily, forKey: .fontFamily) - try container.encode(fontStyle, forKey: .fontStyle) - try container.encode(width, forKey: .width) - - var shapeContainer = container.nestedContainer(keyedBy: ShapeKey.self, forKey: .shapeWrapper) - try shapeContainer.encode(shapes, forKey: .shapes) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case character = "ch" - case fontSize = "size" - case fontFamily = "fFamily" - case fontStyle = "style" - case width = "w" - case shapeWrapper = "data" - } - - private enum ShapeKey: String, CodingKey { - case shapes - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Text/TextAnimator.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Text/TextAnimator.swift deleted file mode 100644 index dc60b92..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Text/TextAnimator.swift +++ /dev/null @@ -1,196 +0,0 @@ -// -// TextAnimator.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/9/19. -// - -import Foundation - -final class TextAnimator: Codable, DictionaryInitializable { - - // MARK: Lifecycle - - required init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: TextAnimator.CodingKeys.self) - name = try container.decodeIfPresent(String.self, forKey: .name) ?? "" - let animatorContainer = try container.nestedContainer(keyedBy: TextAnimatorKeys.self, forKey: .textAnimator) - fillColor = try animatorContainer.decodeIfPresent(KeyframeGroup.self, forKey: .fillColor) - strokeColor = try animatorContainer.decodeIfPresent(KeyframeGroup.self, forKey: .strokeColor) - strokeWidth = try animatorContainer.decodeIfPresent(KeyframeGroup.self, forKey: .strokeWidth) - tracking = try animatorContainer.decodeIfPresent(KeyframeGroup.self, forKey: .tracking) - anchor = try animatorContainer.decodeIfPresent(KeyframeGroup.self, forKey: .anchor) - position = try animatorContainer.decodeIfPresent(KeyframeGroup.self, forKey: .position) - scale = try animatorContainer.decodeIfPresent(KeyframeGroup.self, forKey: .scale) - skew = try animatorContainer.decodeIfPresent(KeyframeGroup.self, forKey: .skew) - skewAxis = try animatorContainer.decodeIfPresent(KeyframeGroup.self, forKey: .skewAxis) - rotationX = try animatorContainer.decodeIfPresent(KeyframeGroup.self, forKey: .rotationX) - rotationY = try animatorContainer.decodeIfPresent(KeyframeGroup.self, forKey: .rotationY) - if let rotation = try animatorContainer.decodeIfPresent(KeyframeGroup.self, forKey: .rotation) { - rotationZ = rotation - } else if let rotation = try animatorContainer.decodeIfPresent(KeyframeGroup.self, forKey: .rotationZ) { - rotationZ = rotation - } else { - rotationZ = nil - } - opacity = try animatorContainer.decodeIfPresent(KeyframeGroup.self, forKey: .opacity) - } - - init(dictionary: [String: Any]) throws { - name = (try? dictionary.value(for: CodingKeys.name)) ?? "" - let animatorDictionary: [String: Any] = try dictionary.value(for: CodingKeys.textAnimator) - if let fillColorDictionary = animatorDictionary[TextAnimatorKeys.fillColor.rawValue] as? [String: Any] { - fillColor = try? KeyframeGroup(dictionary: fillColorDictionary) - } else { - fillColor = nil - } - if let strokeColorDictionary = animatorDictionary[TextAnimatorKeys.strokeColor.rawValue] as? [String: Any] { - strokeColor = try? KeyframeGroup(dictionary: strokeColorDictionary) - } else { - strokeColor = nil - } - if let strokeWidthDictionary = animatorDictionary[TextAnimatorKeys.strokeWidth.rawValue] as? [String: Any] { - strokeWidth = try? KeyframeGroup(dictionary: strokeWidthDictionary) - } else { - strokeWidth = nil - } - if let trackingDictionary = animatorDictionary[TextAnimatorKeys.tracking.rawValue] as? [String: Any] { - tracking = try? KeyframeGroup(dictionary: trackingDictionary) - } else { - tracking = nil - } - if let anchorDictionary = animatorDictionary[TextAnimatorKeys.anchor.rawValue] as? [String: Any] { - anchor = try? KeyframeGroup(dictionary: anchorDictionary) - } else { - anchor = nil - } - if let positionDictionary = animatorDictionary[TextAnimatorKeys.position.rawValue] as? [String: Any] { - position = try? KeyframeGroup(dictionary: positionDictionary) - } else { - position = nil - } - if let scaleDictionary = animatorDictionary[TextAnimatorKeys.scale.rawValue] as? [String: Any] { - scale = try? KeyframeGroup(dictionary: scaleDictionary) - } else { - scale = nil - } - if let skewDictionary = animatorDictionary[TextAnimatorKeys.skew.rawValue] as? [String: Any] { - skew = try? KeyframeGroup(dictionary: skewDictionary) - } else { - skew = nil - } - if let skewAxisDictionary = animatorDictionary[TextAnimatorKeys.skewAxis.rawValue] as? [String: Any] { - skewAxis = try? KeyframeGroup(dictionary: skewAxisDictionary) - } else { - skewAxis = nil - } - if let rotationDictionary = animatorDictionary[TextAnimatorKeys.rotationX.rawValue] as? [String: Any] { - rotationX = try? KeyframeGroup(dictionary: rotationDictionary) - } else { - rotationX = nil - } - - if let rotationDictionary = animatorDictionary[TextAnimatorKeys.rotationY.rawValue] as? [String: Any] { - rotationY = try? KeyframeGroup(dictionary: rotationDictionary) - } else { - rotationY = nil - } - - if let rotationDictionary = animatorDictionary[TextAnimatorKeys.rotation.rawValue] as? [String: Any] { - rotationZ = try? KeyframeGroup(dictionary: rotationDictionary) - } else if let rotationDictionary = animatorDictionary[TextAnimatorKeys.rotationZ.rawValue] as? [String: Any] { - rotationZ = try? KeyframeGroup(dictionary: rotationDictionary) - } else { - rotationZ = nil - } - - if let opacityDictionary = animatorDictionary[TextAnimatorKeys.opacity.rawValue] as? [String: Any] { - opacity = try KeyframeGroup(dictionary: opacityDictionary) - } else { - opacity = nil - } - } - - // MARK: Internal - - let name: String - - /// Anchor - let anchor: KeyframeGroup? - - /// Position - let position: KeyframeGroup? - - /// Scale - let scale: KeyframeGroup? - - /// Skew - let skew: KeyframeGroup? - - /// Skew Axis - let skewAxis: KeyframeGroup? - - /// Rotation on X axis - let rotationX: KeyframeGroup? - - /// Rotation on Y axis - let rotationY: KeyframeGroup? - - /// Rotation on Z axis - let rotationZ: KeyframeGroup? - - /// Opacity - let opacity: KeyframeGroup? - - /// Stroke Color - let strokeColor: KeyframeGroup? - - /// Fill Color - let fillColor: KeyframeGroup? - - /// Stroke Width - let strokeWidth: KeyframeGroup? - - /// Tracking - let tracking: KeyframeGroup? - - func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - var animatorContainer = container.nestedContainer(keyedBy: TextAnimatorKeys.self, forKey: .textAnimator) - try animatorContainer.encodeIfPresent(fillColor, forKey: .fillColor) - try animatorContainer.encodeIfPresent(strokeColor, forKey: .strokeColor) - try animatorContainer.encodeIfPresent(strokeWidth, forKey: .strokeWidth) - try animatorContainer.encodeIfPresent(tracking, forKey: .tracking) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { -// case textSelector = "s" TODO - case textAnimator = "a" - case name = "nm" - } - - private enum TextSelectorKeys: String, CodingKey { - case start = "s" - case end = "e" - case offset = "o" - } - - private enum TextAnimatorKeys: String, CodingKey { - case fillColor = "fc" - case strokeColor = "sc" - case strokeWidth = "sw" - case tracking = "t" - case anchor = "a" - case position = "p" - case scale = "s" - case skew = "sk" - case skewAxis = "sa" - case rotation = "r" - case rotationX = "rx" - case rotationY = "ry" - case rotationZ = "rz" - case opacity = "o" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Model/Text/TextDocument.swift b/Example/Pods/lottie-ios/Sources/Private/Model/Text/TextDocument.swift deleted file mode 100644 index 9682ae2..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Model/Text/TextDocument.swift +++ /dev/null @@ -1,123 +0,0 @@ -// -// TextDocument.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/9/19. -// - -import Foundation - -// MARK: - TextJustification - -enum TextJustification: Int, Codable { - case left - case right - case center -} - -// MARK: - TextDocument - -final class TextDocument: Codable, DictionaryInitializable, AnyInitializable { - - // MARK: Lifecycle - - init(dictionary: [String: Any]) throws { - text = try dictionary.value(for: CodingKeys.text) - fontSize = try dictionary.value(for: CodingKeys.fontSize) - fontFamily = try dictionary.value(for: CodingKeys.fontFamily) - let justificationValue: Int = try dictionary.value(for: CodingKeys.justification) - guard let justification = TextJustification(rawValue: justificationValue) else { - throw InitializableError.invalidInput - } - self.justification = justification - tracking = try dictionary.value(for: CodingKeys.tracking) - lineHeight = try dictionary.value(for: CodingKeys.lineHeight) - baseline = try dictionary.value(for: CodingKeys.baseline) - if let fillColorRawValue = dictionary[CodingKeys.fillColorData.rawValue] { - fillColorData = try? LottieColor(value: fillColorRawValue) - } else { - fillColorData = nil - } - if let strokeColorRawValue = dictionary[CodingKeys.strokeColorData.rawValue] { - strokeColorData = try? LottieColor(value: strokeColorRawValue) - } else { - strokeColorData = nil - } - strokeWidth = try? dictionary.value(for: CodingKeys.strokeWidth) - strokeOverFill = try? dictionary.value(for: CodingKeys.strokeOverFill) - if let textFramePositionRawValue = dictionary[CodingKeys.textFramePosition.rawValue] { - textFramePosition = try? LottieVector3D(value: textFramePositionRawValue) - } else { - textFramePosition = nil - } - if let textFrameSizeRawValue = dictionary[CodingKeys.textFrameSize.rawValue] { - textFrameSize = try? LottieVector3D(value: textFrameSizeRawValue) - } else { - textFrameSize = nil - } - } - - convenience init(value: Any) throws { - guard let dictionary = value as? [String: Any] else { - throw InitializableError.invalidInput - } - try self.init(dictionary: dictionary) - } - - // MARK: Internal - - /// The Text - let text: String - - /// The Font size - let fontSize: Double - - /// The Font Family - let fontFamily: String - - /// Justification - let justification: TextJustification - - /// Tracking - let tracking: Int - - /// Line Height - let lineHeight: Double - - /// Baseline - let baseline: Double? - - /// Fill Color data - let fillColorData: LottieColor? - - /// Scroke Color data - let strokeColorData: LottieColor? - - /// Stroke Width - let strokeWidth: Double? - - /// Stroke Over Fill - let strokeOverFill: Bool? - - let textFramePosition: LottieVector3D? - - let textFrameSize: LottieVector3D? - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case text = "t" - case fontSize = "s" - case fontFamily = "f" - case justification = "j" - case tracking = "tr" - case lineHeight = "lh" - case baseline = "ls" - case fillColorData = "fc" - case strokeColorData = "sc" - case strokeWidth = "sw" - case strokeOverFill = "of" - case textFramePosition = "ps" - case textFrameSize = "sz" - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/RootAnimationLayer.swift b/Example/Pods/lottie-ios/Sources/Private/RootAnimationLayer.swift deleted file mode 100644 index 0a734fc..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/RootAnimationLayer.swift +++ /dev/null @@ -1,53 +0,0 @@ -// Created by Cal Stephens on 12/13/21. -// Copyright © 2021 Airbnb Inc. All rights reserved. - -import QuartzCore - -// MARK: - RootAnimationLayer - -/// A root `CALayer` responsible for playing a Lottie animation -protocol RootAnimationLayer: CALayer { - var animationView: LottieAnimationView? { get set } - - var currentFrame: AnimationFrameTime { get set } - var renderScale: CGFloat { get set } - var respectAnimationFrameRate: Bool { get set } - - var _animationLayers: [CALayer] { get } - var imageProvider: AnimationImageProvider { get set } - var textProvider: AnimationTextProvider { get set } - var fontProvider: AnimationFontProvider { get set } - - /// The `CAAnimation` key corresponding to the primary animation. - /// - `LottieAnimationView` uses this key to check if the animation is still active - var primaryAnimationKey: AnimationKey { get } - - /// Whether or not this layer is currently playing an animation - /// - If the layer returns `nil`, `LottieAnimationView` determines if an animation - /// is playing by checking if there is an active animation for `primaryAnimationKey` - var isAnimationPlaying: Bool? { get } - - /// Instructs this layer to remove all `CAAnimation`s, - /// other than the `CAAnimation` managed by `LottieAnimationView` (if applicable) - func removeAnimations() - - func reloadImages() - func forceDisplayUpdate() - func logHierarchyKeypaths() - func allHierarchyKeypaths() -> [String] - func setValueProvider(_ valueProvider: AnyValueProvider, keypath: AnimationKeypath) - func getValue(for keypath: AnimationKeypath, atFrame: AnimationFrameTime?) -> Any? - func getOriginalValue(for keypath: AnimationKeypath, atFrame: AnimationFrameTime?) -> Any? - - func layer(for keypath: AnimationKeypath) -> CALayer? - func animatorNodes(for keypath: AnimationKeypath) -> [AnimatorNode]? -} - -// MARK: - AnimationKey - -enum AnimationKey { - /// The primary animation and its key should be managed by `LottieAnimationView` - case managed - /// The primary animation always uses the given key - case specific(String) -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Debugging/AnimatorNodeDebugging.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Debugging/AnimatorNodeDebugging.swift deleted file mode 100644 index 63dd318..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Debugging/AnimatorNodeDebugging.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// AnimatorNodeDebugging.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/18/19. -// - -import Foundation - -extension AnimatorNode { - - func printNodeTree() { - parentNode?.printNodeTree() - LottieLogger.shared.info(String(describing: type(of: self))) - - if let group = self as? GroupNode { - LottieLogger.shared.info("* |Children") - group.rootNode?.printNodeTree() - LottieLogger.shared.info("*") - } else { - LottieLogger.shared.info("|") - } - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Debugging/LayerDebugging.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Debugging/LayerDebugging.swift deleted file mode 100644 index dda0870..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Debugging/LayerDebugging.swift +++ /dev/null @@ -1,221 +0,0 @@ -// -// LayerDebugging.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/24/19. -// - -import Foundation -import QuartzCore - -// MARK: - LayerDebugStyle - -struct LayerDebugStyle { - let anchorColor: CGColor - let boundsColor: CGColor - let anchorWidth: CGFloat - let boundsWidth: CGFloat -} - -// MARK: - LayerDebugging - -protocol LayerDebugging { - var debugStyle: LayerDebugStyle { get } -} - -// MARK: - CustomLayerDebugging - -protocol CustomLayerDebugging { - func layerForDebugging() -> CALayer -} - -// MARK: - DebugLayer - -class DebugLayer: CALayer { - init(style: LayerDebugStyle) { - super.init() - zPosition = 1000 - bounds = CGRect(x: 0, y: 0, width: style.anchorWidth, height: style.anchorWidth) - backgroundColor = style.anchorColor - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } -} - -extension CALayer { - - @nonobjc - public func logLayerTree(withIndent: Int = 0) { - var string = "" - for _ in 0...withIndent { - string = string + " " - } - string = string + "|_" + String(describing: self) - LottieLogger.shared.info(string) - if let sublayers = sublayers { - for sublayer in sublayers { - sublayer.logLayerTree(withIndent: withIndent + 1) - } - } - } - -} - -// MARK: - CompositionLayer + CustomLayerDebugging - -extension CompositionLayer: CustomLayerDebugging { - func layerForDebugging() -> CALayer { - contentsLayer - } -} - -extension CALayer { - - @nonobjc - func setDebuggingState(visible: Bool) { - var sublayers = sublayers - if let cust = self as? CustomLayerDebugging { - sublayers = cust.layerForDebugging().sublayers - } - - if let sublayers = sublayers { - for i in 0.. LayerDebugStyle { - let anchorColor = CGColor.rgb(1, 0, 0) - let boundsColor = CGColor.rgb(1, 1, 0) - return LayerDebugStyle( - anchorColor: anchorColor, - boundsColor: boundsColor, - anchorWidth: 10, - boundsWidth: 2) - } - - static func topLayerStyle() -> LayerDebugStyle { - let anchorColor = CGColor.rgba(1, 0.5, 0, 0) - let boundsColor = CGColor.rgb(0, 1, 0) - - return LayerDebugStyle( - anchorColor: anchorColor, - boundsColor: boundsColor, - anchorWidth: 10, - boundsWidth: 2) - } - - static func nullLayerStyle() -> LayerDebugStyle { - let anchorColor = CGColor.rgba(0, 0, 1, 0) - let boundsColor = CGColor.rgb(0, 1, 0) - - return LayerDebugStyle( - anchorColor: anchorColor, - boundsColor: boundsColor, - anchorWidth: 10, - boundsWidth: 2) - } - - static func shapeLayerStyle() -> LayerDebugStyle { - let anchorColor = CGColor.rgba(0, 1, 0, 0) - let boundsColor = CGColor.rgb(0, 1, 0) - - return LayerDebugStyle( - anchorColor: anchorColor, - boundsColor: boundsColor, - anchorWidth: 10, - boundsWidth: 2) - } - - static func shapeRenderLayerStyle() -> LayerDebugStyle { - let anchorColor = CGColor.rgba(0, 1, 1, 0) - let boundsColor = CGColor.rgb(0, 1, 0) - - return LayerDebugStyle( - anchorColor: anchorColor, - boundsColor: boundsColor, - anchorWidth: 10, - boundsWidth: 2) - } -} - -extension Array where Element == LayerModel { - - var parents: [Int] { - var array = [Int]() - for layer in self { - if let parent = layer.parent { - array.append(parent) - } else { - array.append(-1) - } - } - return array - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Debugging/TestHelpers.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Debugging/TestHelpers.swift deleted file mode 100644 index cfe5d48..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Debugging/TestHelpers.swift +++ /dev/null @@ -1,10 +0,0 @@ -// Created by Cal Stephens on 1/28/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -enum TestHelpers { - /// Whether or not snapshot tests are currently running in a test target - static var snapshotTestsAreRunning = false - - /// Whether or not performance tests are currently running in a test target - static var performanceTestsAreRunning = false -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/AnimationKeypathExtension.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/AnimationKeypathExtension.swift deleted file mode 100644 index c2d14f7..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/AnimationKeypathExtension.swift +++ /dev/null @@ -1,274 +0,0 @@ -// -// KeypathSearchableExtension.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/4/19. -// - -import Foundation -import QuartzCore - -extension KeypathSearchable { - - func animatorNodes(for keyPath: AnimationKeypath) -> [AnimatorNode]? { - // Make sure there is a current key path. - guard let currentKey = keyPath.currentKey else { return nil } - - // Now try popping the keypath for wildcard / child search - guard let nextKeypath = keyPath.popKey(keypathName) else { - // We may be on the final keypath. Check for match. - if - let node = self as? AnimatorNode, - currentKey.equalsKeypath(keypathName) - { - // This is the final keypath and matches self. Return.s - return [node] - } - /// Nope. Stop Search - return nil - } - - var results: [AnimatorNode] = [] - - if - let node = self as? AnimatorNode, - nextKeypath.currentKey == nil - { - // Keypath matched self and was the final keypath. - results.append(node) - } - - for childNode in childKeypaths { - // Check if the child has any nodes matching the next keypath. - if let foundNodes = childNode.animatorNodes(for: nextKeypath) { - results.append(contentsOf: foundNodes) - } - - // In this case the current key is fuzzy, and both child and self match the next keyname. Keep digging! - if - currentKey.keyPathType == .fuzzyWildcard, - let nextKeypath = keyPath.nextKeypath, - nextKeypath.equalsKeypath(childNode.keypathName), - let foundNodes = childNode.animatorNodes(for: keyPath) - { - results.append(contentsOf: foundNodes) - } - } - - guard results.count > 0 else { - return nil - } - - return results - } - - func nodeProperties(for keyPath: AnimationKeypath) -> [AnyNodeProperty]? { - guard let nextKeypath = keyPath.popKey(keypathName) else { - /// Nope. Stop Search - return nil - } - - /// Keypath matches in some way. Continue the search. - var results: [AnyNodeProperty] = [] - - /// Check if we have a property keypath yet - if - let propertyKey = nextKeypath.propertyKey, - let property = keypathProperties[propertyKey] - { - /// We found a property! - results.append(property) - } - - if nextKeypath.nextKeypath != nil { - /// Now check child keypaths. - for child in childKeypaths { - if let childProperties = child.nodeProperties(for: nextKeypath) { - results.append(contentsOf: childProperties) - } - } - } - - guard results.count > 0 else { - return nil - } - - return results - } - - func layer(for keyPath: AnimationKeypath) -> CALayer? { - if keyPath.nextKeypath == nil, let layerKey = keyPath.currentKey, layerKey.equalsKeypath(keypathName) { - /// We found our layer! - return keypathLayer - } - guard let nextKeypath = keyPath.popKey(keypathName) else { - /// Nope. Stop Search - return nil - } - - /// Now check child keypaths. - for child in childKeypaths { - if let layer = child.layer(for: nextKeypath) { - return layer - } - } - return nil - } - - /// Computes the list of animation keypaths that descend from this layer - func allKeypaths(for keyPath: AnimationKeypath? = nil) -> [String] { - var allKeypaths: [String] = [] - - let newKeypath: AnimationKeypath - if let previousKeypath = keyPath { - newKeypath = previousKeypath.appendingKey(keypathName) - } else { - newKeypath = AnimationKeypath(keys: [keypathName]) - } - - allKeypaths.append(newKeypath.fullPath) - - for key in keypathProperties.keys { - allKeypaths.append(newKeypath.appendingKey(key).fullPath) - } - - for child in childKeypaths { - allKeypaths.append(contentsOf: child.allKeypaths(for: newKeypath)) - } - - return allKeypaths - } -} - -extension AnimationKeypath { - var currentKey: String? { - keys.first - } - - var nextKeypath: String? { - guard keys.count > 1 else { - return nil - } - return keys[1] - } - - var propertyKey: String? { - if nextKeypath == nil { - /// There are no more keypaths. This is a property key. - return currentKey - } - if keys.count == 2, currentKey?.keyPathType == .fuzzyWildcard { - /// The next keypath is the last and the current is a fuzzy key. - return nextKeypath - } - return nil - } - - var fullPath: String { - keys.joined(separator: ".") - } - - // Pops the top keypath from the stack if the keyname matches. - func popKey(_ keyname: String) -> AnimationKeypath? { - guard - let currentKey = currentKey, - currentKey.equalsKeypath(keyname), - keys.count > 1 else - { - // Current key either doesnt match or we are on the last key. - return nil - } - - // Pop the keypath from the stack and return the new stack. - let newKeys: [String] - - if currentKey.keyPathType == .fuzzyWildcard { - /// Dont remove if current key is a fuzzy wildcard, and if the next keypath doesnt equal keypathname - if - let nextKeypath = nextKeypath, - nextKeypath.equalsKeypath(keyname) - { - /// Remove next two keypaths. This keypath breaks the wildcard. - var oldKeys = keys - oldKeys.remove(at: 0) - oldKeys.remove(at: 0) - newKeys = oldKeys - } else { - newKeys = keys - } - } else { - var oldKeys = keys - oldKeys.remove(at: 0) - newKeys = oldKeys - } - - return AnimationKeypath(keys: newKeys) - } - - func appendingKey(_ key: String) -> AnimationKeypath { - var newKeys = keys - newKeys.append(key) - return AnimationKeypath(keys: newKeys) - } -} - -extension String { - var keyPathType: KeyType { - switch self { - case "*": - return .wildcard - case "**": - return .fuzzyWildcard - default: - return .specific - } - } - - func equalsKeypath(_ keyname: String) -> Bool { - if keyPathType == .wildcard || keyPathType == .fuzzyWildcard { - return true - } - if self == keyname { - return true - } - if let index = firstIndex(of: "*") { - // Wildcard search. - let prefix = String(prefix(upTo: index)) - let suffix = String(suffix(from: self.index(after: index))) - - if prefix.count > 0 { - // Match prefix. - if keyname.count < prefix.count { - return false - } - let testPrefix = String(keyname.prefix(upTo: keyname.index(keyname.startIndex, offsetBy: prefix.count))) - if testPrefix != prefix { - // Prefix doesnt match - return false - } - } - if suffix.count > 0 { - // Match suffix. - if keyname.count < suffix.count { - // Suffix doesnt match - return false - } - let index = keyname.index(keyname.endIndex, offsetBy: -suffix.count) - let testSuffix = String(keyname.suffix(from: index)) - if testSuffix != suffix { - return false - } - } - return true - } - return false - } -} - -// MARK: - KeyType - -enum KeyType { - case specific - case wildcard - case fuzzyWildcard -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/BlendMode+Filter.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/BlendMode+Filter.swift deleted file mode 100644 index ef93a39..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/BlendMode+Filter.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// File.swift -// -// -// Created by Denis Koryttsev on 10.05.2022. -// - -extension BlendMode { - /// The Core Image filter name for this `BlendMode`, that can be applied to a `CALayer`'s `compositingFilter`. - /// Supported compositing filters are defined here: https://developer.apple.com/library/archive/documentation/GraphicsImaging/Reference/CoreImageFilterReference/index.html#//apple_ref/doc/uid/TP30000136-SW71 - var filterName: String? { - switch self { - case .normal: return nil - case .multiply: return "multiplyBlendMode" - case .screen: return "screenBlendMode" - case .overlay: return "overlayBlendMode" - case .darken: return "darkenBlendMode" - case .lighten: return "lightenBlendMode" - case .colorDodge: return "colorDodgeBlendMode" - case .colorBurn: return "colorBurnBlendMode" - case .hardLight: return "hardLightBlendMode" - case .softLight: return "softLightBlendMode" - case .difference: return "differenceBlendMode" - case .exclusion: return "exclusionBlendMode" - case .hue: return "hueBlendMode" - case .saturation: return "saturationBlendMode" - case .color: return "colorBlendMode" - case .luminosity: return "luminosityBlendMode" - } - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/CGColor+RGB.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/CGColor+RGB.swift deleted file mode 100644 index 0b57209..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/CGColor+RGB.swift +++ /dev/null @@ -1,25 +0,0 @@ -// Created by Cal Stephens on 1/7/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -import QuartzCore - -extension CGColor { - /// Initializes a `CGColor` using the given `RGB` values - static func rgb(_ red: CGFloat, _ green: CGFloat, _ blue: CGFloat) -> CGColor { - rgba(red, green, blue, 1.0) - } - - /// Initializes a `CGColor` using the given grayscale value - static func gray(_ gray: CGFloat) -> CGColor { - CGColor( - colorSpace: CGColorSpaceCreateDeviceGray(), - components: [gray, 1.0])! - } - - /// Initializes a `CGColor` using the given `RGBA` values - static func rgba(_ red: CGFloat, _ green: CGFloat, _ blue: CGFloat, _ alpha: CGFloat) -> CGColor { - CGColor( - colorSpace: LottieConfiguration.shared.colorSpace, - components: [red, green, blue, alpha])! - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/CGFloatExtensions.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/CGFloatExtensions.swift deleted file mode 100644 index 015a10c..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/CGFloatExtensions.swift +++ /dev/null @@ -1,152 +0,0 @@ -// -// CGFloatExtensions.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/14/19. -// - -import Foundation -import QuartzCore - -extension CGFloat { - - // MARK: Internal - - var squared: CGFloat { - self * self - } - - var cubed: CGFloat { - self * self * self - } - - var cubicRoot: CGFloat { - CGFloat(pow(Double(self), 1.0 / 3.0)) - } - - func isInRangeOrEqual(_ from: CGFloat, _ to: CGFloat) -> Bool { - from <= self && self <= to - } - - func isInRange(_ from: CGFloat, _ to: CGFloat) -> Bool { - from < self && self < to - } - - func cubicBezierInterpolate(_ P0: CGPoint, _ P1: CGPoint, _ P2: CGPoint, _ P3: CGPoint) -> CGFloat { - var t: CGFloat - if self == P0.x { - // Handle corner cases explicitly to prevent rounding errors - t = 0 - } else if self == P3.x { - t = 1 - } else { - // Calculate t - let a = -P0.x + 3 * P1.x - 3 * P2.x + P3.x; - let b = 3 * P0.x - 6 * P1.x + 3 * P2.x; - let c = -3 * P0.x + 3 * P1.x; - let d = P0.x - self; - let tTemp = CGFloat.SolveCubic(a, b, c, d); - if tTemp == -1 { - return -1; - } - t = tTemp - } - - // Calculate y from t - return (1 - t).cubed * P0.y + 3 * t * (1 - t).squared * P1.y + 3 * t.squared * (1 - t) * P2.y + t.cubed * P3.y; - } - - func cubicBezier(_ t: CGFloat, _ c1: CGFloat, _ c2: CGFloat, _ end: CGFloat) -> CGFloat { - let t_ = (1.0 - t) - let tt_ = t_ * t_ - let ttt_ = t_ * t_ * t_ - let tt = t * t - let ttt = t * t * t - - return self * ttt_ - + 3.0 * c1 * tt_ * t - + 3.0 * c2 * t_ * tt - + end * ttt; - } - - // MARK: Fileprivate - - fileprivate static func SolveQuadratic(_ a: CGFloat, _ b: CGFloat, _ c: CGFloat) -> CGFloat { - var result = (-b + sqrt(b.squared - 4 * a * c)) / (2 * a); - guard !result.isInRangeOrEqual(0, 1) else { - return result - } - - result = (-b - sqrt(b.squared - 4 * a * c)) / (2 * a); - guard !result.isInRangeOrEqual(0, 1) else { - return result - } - - return -1; - } - - fileprivate static func SolveCubic(_ a: CGFloat, _ b: CGFloat, _ c: CGFloat, _ d: CGFloat) -> CGFloat { - if a == 0 { - return SolveQuadratic(b, c, d) - } - if d == 0 { - return 0 - } - let a = a - var b = b - var c = c - var d = d - b /= a - c /= a - d /= a - var q = (3.0 * c - b.squared) / 9.0 - let r = (-27.0 * d + b * (9.0 * c - 2.0 * b.squared)) / 54.0 - let disc = q.cubed + r.squared - let term1 = b / 3.0 - - if disc > 0 { - var s = r + sqrt(disc) - s = (s < 0) ? -((-s).cubicRoot) : s.cubicRoot - var t = r - sqrt(disc) - t = (t < 0) ? -((-t).cubicRoot) : t.cubicRoot - - let result = -term1 + s + t; - if result.isInRangeOrEqual(0, 1) { - return result - } - } else if disc == 0 { - let r13 = (r < 0) ? -((-r).cubicRoot) : r.cubicRoot; - - var result = -term1 + 2.0 * r13; - if result.isInRangeOrEqual(0, 1) { - return result - } - - result = -(r13 + term1); - if result.isInRangeOrEqual(0, 1) { - return result - } - - } else { - q = -q; - var dum1 = q * q * q; - dum1 = acos(r / sqrt(dum1)); - let r13 = 2.0 * sqrt(q); - - var result = -term1 + r13 * cos(dum1 / 3.0); - if result.isInRangeOrEqual(0, 1) { - return result - } - result = -term1 + r13 * cos((dum1 + 2.0 * .pi) / 3.0); - if result.isInRangeOrEqual(0, 1) { - return result - } - result = -term1 + r13 * cos((dum1 + 4.0 * .pi) / 3.0); - if result.isInRangeOrEqual(0, 1) { - return result - } - } - - return -1; - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/DataExtension.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/DataExtension.swift deleted file mode 100644 index 2aa6d32..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/DataExtension.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// DataExtension.swift -// Lottie -// -// Created by René Fouquet on 03.05.21. -// - -import Foundation -#if canImport(UIKit) -import UIKit -#elseif canImport(AppKit) -import AppKit -#endif - -extension Data { - - init(assetName: String, in bundle: Bundle) throws { - #if canImport(UIKit) - if let asset = NSDataAsset(name: assetName, bundle: bundle) { - self = asset.data - return - } else { - throw DotLottieError.assetNotFound(name: assetName, bundle: bundle) - } - #else - if #available(macOS 10.11, *) { - if let asset = NSDataAsset(name: assetName, bundle: bundle) { - self = asset.data - return - } else { - throw DotLottieError.assetNotFound(name: assetName, bundle: bundle) - } - } - throw DotLottieError.loadingFromAssetNotSupported - #endif - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/MathKit.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/MathKit.swift deleted file mode 100644 index f7ca635..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/MathKit.swift +++ /dev/null @@ -1,450 +0,0 @@ -// -// MathKit.swift -// UIToolBox -// -// Created by Brandon Withrow on 10/10/18. -// -// From https://github.com/buba447/UIToolBox - -import CoreGraphics -import Foundation - -extension Int { - var cgFloat: CGFloat { - CGFloat(self) - } -} - -extension Double { - var cgFloat: CGFloat { - CGFloat(self) - } -} - -// MARK: - CGFloat + Interpolatable - -extension CGFloat { - - func remap(fromLow: CGFloat, fromHigh: CGFloat, toLow: CGFloat, toHigh: CGFloat) -> CGFloat { - guard (fromHigh - fromLow) != 0 else { - // Would produce NAN - return 0 - } - return toLow + (self - fromLow) * (toHigh - toLow) / (fromHigh - fromLow) - } - - /// Returns a value that is clamped between the two numbers - /// - /// 1. The order of arguments does not matter. - func clamp(_ a: CGFloat, _ b: CGFloat) -> CGFloat { - CGFloat(Double(self).clamp(Double(a), Double(b))) - } - - /// Returns the difference between the receiver and the given number. - /// - Parameter absolute: If *true* (Default) the returned value will always be positive. - func diff(_ a: CGFloat, absolute: Bool = true) -> CGFloat { - absolute ? abs(a - self) : a - self - } - - func toRadians() -> CGFloat { self * .pi / 180 } - func toDegrees() -> CGFloat { self * 180 / .pi } - -} - -// MARK: - Double - -extension Double { - - func remap(fromLow: Double, fromHigh: Double, toLow: Double, toHigh: Double) -> Double { - toLow + (self - fromLow) * (toHigh - toLow) / (fromHigh - fromLow) - } - - /// Returns a value that is clamped between the two numbers - /// - /// 1. The order of arguments does not matter. - func clamp(_ a: Double, _ b: Double) -> Double { - let minValue = a <= b ? a : b - let maxValue = a <= b ? b : a - return max(min(self, maxValue), minValue) - } - -} - -extension CGRect { - - // MARK: Lifecycle - - /// Initializes a new CGRect with a center point and size. - init(center: CGPoint, size: CGSize) { - self.init( - x: center.x - (size.width * 0.5), - y: center.y - (size.height * 0.5), - width: size.width, - height: size.height) - } - - // MARK: Internal - - /// Returns the total area of the rect. - var area: CGFloat { - width * height - } - - /// The center point of the rect. Settable. - var center: CGPoint { - get { - CGPoint(x: midX, y: midY) - } - set { - origin = CGPoint( - x: newValue.x - (size.width * 0.5), - y: newValue.y - (size.height * 0.5)) - } - } - - /// The top left point of the rect. Settable. - var topLeft: CGPoint { - get { - CGPoint(x: minX, y: minY) - } - set { - origin = CGPoint( - x: newValue.x, - y: newValue.y) - } - } - - /// The bottom left point of the rect. Settable. - var bottomLeft: CGPoint { - get { - CGPoint(x: minX, y: maxY) - } - set { - origin = CGPoint( - x: newValue.x, - y: newValue.y - size.height) - } - } - - /// The top right point of the rect. Settable. - var topRight: CGPoint { - get { - CGPoint(x: maxX, y: minY) - } - set { - origin = CGPoint( - x: newValue.x - size.width, - y: newValue.y) - } - } - - /// The bottom right point of the rect. Settable. - var bottomRight: CGPoint { - get { - CGPoint(x: maxX, y: maxY) - } - set { - origin = CGPoint( - x: newValue.x - size.width, - y: newValue.y - size.height) - } - } - -} - -extension CGSize { - - /// Operator convenience to add sizes with + - static func +(left: CGSize, right: CGSize) -> CGSize { - left.add(right) - } - - /// Operator convenience to subtract sizes with - - static func -(left: CGSize, right: CGSize) -> CGSize { - left.subtract(right) - } - - /// Operator convenience to multiply sizes with * - static func *(left: CGSize, right: CGFloat) -> CGSize { - CGSize(width: left.width * right, height: left.height * right) - } - - /// Returns the scale float that will fit the receive inside of the given size. - func scaleThatFits(_ size: CGSize) -> CGFloat { - CGFloat.minimum(width / size.width, height / size.height) - } - - /// Adds receiver size to give size. - func add(_ size: CGSize) -> CGSize { - CGSize(width: width + size.width, height: height + size.height) - } - - /// Subtracts given size from receiver size. - func subtract(_ size: CGSize) -> CGSize { - CGSize(width: width - size.width, height: height - size.height) - } - - /// Multiplies receiver size by the given size. - func multiply(_ size: CGSize) -> CGSize { - CGSize(width: width * size.width, height: height * size.height) - } -} - -// MARK: - CGLine - -/// A struct that defines a line segment with two CGPoints -struct CGLine { - - // MARK: Lifecycle - - /// Initializes a line segment with start and end points - init(start: CGPoint, end: CGPoint) { - self.start = start - self.end = end - } - - // MARK: Internal - - /// The Start of the line segment. - var start: CGPoint - /// The End of the line segment. - var end: CGPoint - - /// The length of the line segment. - var length: CGFloat { - end.distanceTo(start) - } - - /// Returns a line segment that is normalized to a length of 1 - func normalize() -> CGLine { - let len = length - guard len > 0 else { - return self - } - let relativeEnd = end - start - let relativeVector = CGPoint(x: relativeEnd.x / len, y: relativeEnd.y / len) - let absoluteVector = relativeVector + start - return CGLine(start: start, end: absoluteVector) - } - - /// Trims a line segment to the given length - func trimmedToLength(_ toLength: CGFloat) -> CGLine { - let len = length - guard len > 0 else { - return self - } - let relativeEnd = end - start - let relativeVector = CGPoint(x: relativeEnd.x / len, y: relativeEnd.y / len) - let sizedVector = CGPoint(x: relativeVector.x * toLength, y: relativeVector.y * toLength) - let absoluteVector = sizedVector + start - return CGLine(start: start, end: absoluteVector) - } - - /// Flips a line vertically and horizontally from the start point. - func flipped() -> CGLine { - let relativeEnd = end - start - let flippedEnd = CGPoint(x: relativeEnd.x * -1, y: relativeEnd.y * -1) - return CGLine(start: start, end: flippedEnd + start) - } - - /// Move the line to the new start point. - func transpose(_ toPoint: CGPoint) -> CGLine { - let diff = toPoint - start - let newEnd = end + diff - return CGLine(start: toPoint, end: newEnd) - } - -} - -infix operator +| -infix operator +- - -extension CGPoint { - - /// Returns the length between the receiver and *CGPoint.zero* - var vectorLength: CGFloat { - distanceTo(.zero) - } - - var isZero: Bool { - x == 0 && y == 0 - } - - /// Operator convenience to divide points with / - static func / (lhs: CGPoint, rhs: CGFloat) -> CGPoint { - CGPoint(x: lhs.x / CGFloat(rhs), y: lhs.y / CGFloat(rhs)) - } - - /// Operator convenience to multiply points with * - static func * (lhs: CGPoint, rhs: CGFloat) -> CGPoint { - CGPoint(x: lhs.x * CGFloat(rhs), y: lhs.y * CGFloat(rhs)) - } - - /// Operator convenience to add points with + - static func +(left: CGPoint, right: CGPoint) -> CGPoint { - left.add(right) - } - - /// Operator convenience to subtract points with - - static func -(left: CGPoint, right: CGPoint) -> CGPoint { - left.subtract(right) - } - - static func +|(left: CGPoint, right: CGFloat) -> CGPoint { - CGPoint(x: left.x, y: left.y + right) - } - - static func +-(left: CGPoint, right: CGFloat) -> CGPoint { - CGPoint(x: left.x + right, y: left.y) - } - - /// Returns the distance between the receiver and the given point. - func distanceTo(_ a: CGPoint) -> CGFloat { - let xDist = a.x - x - let yDist = a.y - y - return CGFloat(sqrt((xDist * xDist) + (yDist * yDist))) - } - - func rounded(decimal: CGFloat) -> CGPoint { - CGPoint(x: round(decimal * x) / decimal, y: round(decimal * y) / decimal) - } - - func interpolate( - _ to: CGPoint, - outTangent: CGPoint, - inTangent: CGPoint, - amount: CGFloat, - maxIterations: Int = 3, - samples: Int = 20, - accuracy: CGFloat = 1) - -> CGPoint - { - if amount == 0 { - return self - } - if amount == 1 { - return to - } - - if - colinear(outTangent, inTangent) == true, - outTangent.colinear(inTangent, to) == true - { - return interpolate(to: to, amount: amount) - } - - let step = 1 / CGFloat(samples) - - var points: [(point: CGPoint, distance: CGFloat)] = [(point: self, distance: 0)] - var totalLength: CGFloat = 0 - - var previousPoint = self - var previousAmount = CGFloat(0) - - var closestPoint = 0 - - while previousAmount < 1 { - previousAmount = previousAmount + step - - if previousAmount < amount { - closestPoint = closestPoint + 1 - } - - let newPoint = pointOnPath(to, outTangent: outTangent, inTangent: inTangent, amount: previousAmount) - let distance = previousPoint.distanceTo(newPoint) - totalLength = totalLength + distance - points.append((point: newPoint, distance: totalLength)) - previousPoint = newPoint - } - - let accurateDistance = amount * totalLength - var point = points[closestPoint] - - var foundPoint = false - - var pointAmount = CGFloat(closestPoint) * step - var nextPointAmount: CGFloat = pointAmount + step - - var refineIterations = 0 - while foundPoint == false { - refineIterations = refineIterations + 1 - /// First see if the next point is still less than the projected length. - let nextPoint = points[closestPoint + 1] - if nextPoint.distance < accurateDistance { - point = nextPoint - closestPoint = closestPoint + 1 - pointAmount = CGFloat(closestPoint) * step - nextPointAmount = pointAmount + step - if closestPoint == points.count { - foundPoint = true - } - continue - } - if accurateDistance < point.distance { - closestPoint = closestPoint - 1 - if closestPoint < 0 { - foundPoint = true - continue - } - point = points[closestPoint] - pointAmount = CGFloat(closestPoint) * step - nextPointAmount = pointAmount + step - continue - } - - /// Now we are certain the point is the closest point under the distance - let pointDiff = nextPoint.distance - point.distance - let proposedPointAmount = ((accurateDistance - point.distance) / pointDiff) - .remap(fromLow: 0, fromHigh: 1, toLow: pointAmount, toHigh: nextPointAmount) - - let newPoint = pointOnPath(to, outTangent: outTangent, inTangent: inTangent, amount: proposedPointAmount) - let newDistance = point.distance + point.point.distanceTo(newPoint) - pointAmount = proposedPointAmount - point = (point: newPoint, distance: newDistance) - if - accurateDistance - newDistance <= accuracy || - newDistance - accurateDistance <= accuracy - { - foundPoint = true - } - - if refineIterations == maxIterations { - foundPoint = true - } - } - return point.point - } - - func pointOnPath(_ to: CGPoint, outTangent: CGPoint, inTangent: CGPoint, amount: CGFloat) -> CGPoint { - let a = interpolate(to: outTangent, amount: amount) - let b = outTangent.interpolate(to: inTangent, amount: amount) - let c = inTangent.interpolate(to: to, amount: amount) - let d = a.interpolate(to: b, amount: amount) - let e = b.interpolate(to: c, amount: amount) - let f = d.interpolate(to: e, amount: amount) - return f - } - - func colinear(_ a: CGPoint, _ b: CGPoint) -> Bool { - let area = x * (a.y - b.y) + a.x * (b.y - y) + b.x * (y - a.y); - let accuracy: CGFloat = 0.05 - if area < accuracy, area > -accuracy { - return true - } - return false - } - - /// Subtracts the given point from the receiving point. - func subtract(_ point: CGPoint) -> CGPoint { - CGPoint( - x: x - point.x, - y: y - point.y) - } - - /// Adds the given point from the receiving point. - func add(_ point: CGPoint) -> CGPoint { - CGPoint( - x: x + point.x, - y: y + point.y) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/StringExtensions.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/StringExtensions.swift deleted file mode 100644 index 4a03843..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Extensions/StringExtensions.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// StringExtensions.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/25/19. -// - -import CoreGraphics -import Foundation - -extension String { - - var cgColor: CGColor { - let (red, green, blue) = hexColorComponents() - return .rgb(red, green, blue) - } - - func hexColorComponents() -> (red: CGFloat, green: CGFloat, blue: CGFloat) { - var cString: String = trimmingCharacters(in: .whitespacesAndNewlines).uppercased() - - if cString.hasPrefix("#") { - cString.remove(at: cString.startIndex) - } - - if (cString.count) != 6 { - return (red: 0, green: 0, blue: 0) - } - - var rgbValue: UInt64 = 0 - Scanner(string: cString).scanHexInt64(&rgbValue) - - return ( - red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0, - green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0, - blue: CGFloat(rgbValue & 0x0000FF) / 255.0) - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Helpers/AnimationContext.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Helpers/AnimationContext.swift deleted file mode 100644 index b8c0ef4..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Helpers/AnimationContext.swift +++ /dev/null @@ -1,91 +0,0 @@ -// -// AnimationContext.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/1/19. -// - -import CoreGraphics -import Foundation -import QuartzCore - -/// A completion block for animations. `true` is passed in if the animation completed playing. -public typealias LottieCompletionBlock = (Bool) -> Void - -// MARK: - AnimationContext - -struct AnimationContext { - - init( - playFrom: AnimationFrameTime, - playTo: AnimationFrameTime, - closure: LottieCompletionBlock?) - { - self.playTo = playTo - self.playFrom = playFrom - self.closure = AnimationCompletionDelegate(completionBlock: closure) - } - - var playFrom: AnimationFrameTime - var playTo: AnimationFrameTime - var closure: AnimationCompletionDelegate - -} - -// MARK: Equatable - -extension AnimationContext: Equatable { - /// Whether or not the two given `AnimationContext`s are functionally equivalent - /// - This checks whether or not a completion handler was provided, - /// but does not check whether or not the two completion handlers are equivalent. - static func == (_ lhs: AnimationContext, _ rhs: AnimationContext) -> Bool { - lhs.playTo == rhs.playTo - && lhs.playFrom == rhs.playFrom - && (lhs.closure.completionBlock == nil) == (rhs.closure.completionBlock == nil) - } -} - -// MARK: - AnimationContextState - -enum AnimationContextState { - case playing - case cancelled - case complete -} - -// MARK: - AnimationCompletionDelegate - -class AnimationCompletionDelegate: NSObject, CAAnimationDelegate { - - // MARK: Lifecycle - - init(completionBlock: LottieCompletionBlock?) { - self.completionBlock = completionBlock - super.init() - } - - // MARK: Public - - public func animationDidStop(_ anim: CAAnimation, finished flag: Bool) { - guard ignoreDelegate == false else { return } - animationState = flag ? .complete : .cancelled - if let animationLayer = animationLayer, let key = animationKey { - animationLayer.removeAnimation(forKey: key) - if flag { - animationLayer.currentFrame = (anim as! CABasicAnimation).toValue as! CGFloat - } - } - if let completionBlock = completionBlock { - completionBlock(flag) - } - } - - // MARK: Internal - - var animationLayer: RootAnimationLayer? - var animationKey: String? - var ignoreDelegate = false - var animationState: AnimationContextState = .playing - - let completionBlock: LottieCompletionBlock? -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Interpolatable/InterpolatableExtensions.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Interpolatable/InterpolatableExtensions.swift deleted file mode 100644 index b390b56..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Interpolatable/InterpolatableExtensions.swift +++ /dev/null @@ -1,134 +0,0 @@ -// -// InterpolatableExtensions.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/14/19. -// - -import CoreGraphics -import Foundation - -extension LottieColor { - - // MARK: Lifecycle - - /// Initialize a new color with Hue Saturation and Value - init(h: Double, s: Double, v: Double, a: Double) { - let i = floor(h * 6) - let f = h * 6 - i - let p = v * (1 - s); - let q = v * (1 - f * s) - let t = v * (1 - (1 - f) * s) - - switch i.truncatingRemainder(dividingBy: 6) { - case 0: - r = v - g = t - b = p - case 1: - r = q - g = v - b = p - case 2: - r = p - g = v - b = t - case 3: - r = p - g = q - b = v - case 4: - r = t - g = p - b = v - case 5: - r = v - g = p - b = q - default: - r = 0 - g = 0 - b = 0 - } - self.a = a - } - - init(y: Double, u: Double, v: Double, a: Double) { - // From https://www.fourcc.org/fccyvrgb.php - r = y + 1.403 * v - g = y - 0.344 * u - b = y + 1.770 * u - self.a = a - } - - // MARK: Internal - - /// Hue Saturation Value of the color. - var hsva: (h: Double, s: Double, v: Double, a: Double) { - let maxValue = max(r, g, b) - let minValue = min(r, g, b) - - var h: Double, s: Double, v: Double = maxValue - - let d = maxValue - minValue - s = maxValue == 0 ? 0 : d / maxValue; - - if maxValue == minValue { - h = 0; // achromatic - } else { - switch maxValue { - case r: h = (g - b) / d + (g < b ? 6 : 0) - case g: h = (b - r) / d + 2 - case b: h = (r - g) / d + 4 - default: h = maxValue - } - h = h / 6 - } - return (h: h, s: s, v: v, a: a) - } - - var yuv: (y: Double, u: Double, v: Double, a: Double) { - /// From https://www.fourcc.org/fccyvrgb.php - let y = 0.299 * r + 0.587 * g + 0.114 * b - let u = -0.14713 * r - 0.28886 * g + 0.436 * b - let v = 0.615 * r - 0.51499 * g - 0.10001 * b - return (y: y, u: u, v: v, a: a) - } - -} - -// MARK: - CurveVertex + Interpolatable - -extension CurveVertex: Interpolatable { - func interpolate(to: CurveVertex, amount: CGFloat) -> CurveVertex { - CurveVertex( - point: point.interpolate(to: to.point, amount: amount), - inTangent: inTangent.interpolate(to: to.inTangent, amount: amount), - outTangent: outTangent.interpolate(to: to.outTangent, amount: amount)) - } -} - -// MARK: - BezierPath + Interpolatable - -extension BezierPath: Interpolatable { - func interpolate(to: BezierPath, amount: CGFloat) -> BezierPath { - var newPath = BezierPath() - for i in 0.. TextDocument { - if amount == 1 { - return to - } - return self - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Interpolatable/KeyframeExtensions.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Interpolatable/KeyframeExtensions.swift deleted file mode 100644 index e6e0c18..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Interpolatable/KeyframeExtensions.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// KeyframeExtensions.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/14/19. -// - -import CoreGraphics -import Foundation - -extension Keyframe where T: AnyInterpolatable { - func interpolate(to: Keyframe, progress: CGFloat) -> T { - value._interpolate( - to: to.value, - amount: progress, - spatialOutTangent: spatialOutTangent?.pointValue, - spatialInTangent: to.spatialInTangent?.pointValue) - } -} - -extension Keyframe { - /// Interpolates the keyTime into a value from 0-1 - func interpolatedProgress(_ to: Keyframe, keyTime: CGFloat) -> CGFloat { - let startTime = time - let endTime = to.time - if keyTime <= startTime { - return 0 - } - if endTime <= keyTime { - return 1 - } - - if isHold { - return 0 - } - - let outTanPoint = outTangent?.pointValue ?? .zero - let inTanPoint = to.inTangent?.pointValue ?? CGPoint(x: 1, y: 1) - var progress: CGFloat = keyTime.remap(fromLow: startTime, fromHigh: endTime, toLow: 0, toHigh: 1) - if !outTanPoint.isZero || !inTanPoint.equalTo(CGPoint(x: 1, y: 1)) { - /// Cubic interpolation - progress = progress.cubicBezierInterpolate(.zero, outTanPoint, inTanPoint, CGPoint(x: 1, y: 1)) - } - return progress - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Interpolatable/KeyframeInterpolator.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Interpolatable/KeyframeInterpolator.swift deleted file mode 100644 index 93ba737..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Interpolatable/KeyframeInterpolator.swift +++ /dev/null @@ -1,250 +0,0 @@ -// -// KeyframeInterpolator.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/15/19. -// - -import CoreGraphics -import Foundation - -// MARK: - KeyframeInterpolator - -/// A value provider that produces a value at Time from a group of keyframes -final class KeyframeInterpolator: ValueProvider where ValueType: AnyInterpolatable { - - // MARK: Lifecycle - - init(keyframes: ContiguousArray>) { - self.keyframes = keyframes - } - - // MARK: Internal - - let keyframes: ContiguousArray> - - var valueType: Any.Type { - ValueType.self - } - - var storage: ValueProviderStorage { - .closure { [self] frame in - // First set the keyframe span for the frame. - updateSpanIndices(frame: frame) - lastUpdatedFrame = frame - // If only one keyframe return its value - let progress: CGFloat - let value: ValueType - - if - let leading = leadingKeyframe, - let trailing = trailingKeyframe - { - /// We have leading and trailing keyframe. - progress = leading.interpolatedProgress(trailing, keyTime: frame) - value = leading.interpolate(to: trailing, progress: progress) - } else if let leading = leadingKeyframe { - progress = 0 - value = leading.value - } else if let trailing = trailingKeyframe { - progress = 1 - value = trailing.value - } else { - /// Satisfy the compiler. - progress = 0 - value = keyframes[0].value - } - return value - } - } - - /// Returns true to trigger a frame update for this interpolator. - /// - /// An interpolator will be asked if it needs to update every frame. - /// If the interpolator needs updating it will be asked to compute its value for - /// the given frame. - /// - /// Cases a keyframe should not be updated: - /// - If time is in span and leading keyframe is hold - /// - If time is after the last keyframe. - /// - If time is before the first keyframe - /// - /// Cases for updating a keyframe: - /// - If time is in the span, and is not a hold - /// - If time is outside of the span, and there are more keyframes - /// - If a value delegate is set - /// - If leading and trailing are both nil. - func hasUpdate(frame: CGFloat) -> Bool { - if lastUpdatedFrame == nil { - return true - } - - if - let leading = leadingKeyframe, - trailingKeyframe == nil, - leading.time < frame - { - /// Frame is after bounds of keyframes - return false - } - if - let trailing = trailingKeyframe, - leadingKeyframe == nil, - frame < trailing.time - { - /// Frame is before bounds of keyframes - return false - } - if - let leading = leadingKeyframe, - let trailing = trailingKeyframe, - leading.isHold, - leading.time < frame, - frame < trailing.time - { - return false - } - return true - } - - // MARK: Fileprivate - - fileprivate var lastUpdatedFrame: CGFloat? - - fileprivate var leadingIndex: Int? = nil - fileprivate var trailingIndex: Int? = nil - fileprivate var leadingKeyframe: Keyframe? = nil - fileprivate var trailingKeyframe: Keyframe? = nil - - /// Finds the appropriate Leading and Trailing keyframe index for the given time. - fileprivate func updateSpanIndices(frame: CGFloat) { - guard keyframes.count > 0 else { - leadingIndex = nil - trailingIndex = nil - leadingKeyframe = nil - trailingKeyframe = nil - return - } - - // This function searches through the array to find the span of two keyframes - // that contain the current time. - // - // We could use Array.first(where:) but that would search through the entire array - // each frame. - // Instead we track the last used index and search either forwards or - // backwards from there. This reduces the iterations and complexity from - // - // O(n), where n is the length of the sequence to - // O(n), where n is the number of items after or before the last used index. - // - - if keyframes.count == 1 { - /// Only one keyframe. Set it as first and move on. - leadingIndex = 0 - trailingIndex = nil - leadingKeyframe = keyframes[0] - trailingKeyframe = nil - return - } - - /// Sets the initial keyframes. This is often only needed for the first check. - if - leadingIndex == nil, - trailingIndex == nil - { - if frame < keyframes[0].time { - /// Time is before the first keyframe. Set it as the trailing. - trailingIndex = 0 - } else { - /// Time is after the first keyframe. Set the keyframe and the trailing. - leadingIndex = 0 - trailingIndex = 1 - } - } - - if - let currentTrailing = trailingIndex, - keyframes[currentTrailing].time <= frame - { - /// Time is after the current span. Iterate forward. - var newLeading = currentTrailing - var keyframeFound = false - while !keyframeFound { - leadingIndex = newLeading - trailingIndex = keyframes.validIndex(newLeading + 1) - - guard let trailing = trailingIndex else { - /// We have reached the end of our keyframes. Time is after the last keyframe. - keyframeFound = true - continue - } - if frame < keyframes[trailing].time { - /// Keyframe in current span. - keyframeFound = true - continue - } - /// Advance the array. - newLeading = trailing - } - - } else if - let currentLeading = leadingIndex, - frame < keyframes[currentLeading].time - { - /// Time is before the current span. Iterate backwards - var newTrailing = currentLeading - - var keyframeFound = false - while !keyframeFound { - leadingIndex = keyframes.validIndex(newTrailing - 1) - trailingIndex = newTrailing - - guard let leading = leadingIndex else { - /// We have reached the end of our keyframes. Time is after the last keyframe. - keyframeFound = true - continue - } - if keyframes[leading].time <= frame { - /// Keyframe in current span. - keyframeFound = true - continue - } - /// Step back - newTrailing = leading - } - } - if let keyFrame = leadingIndex { - leadingKeyframe = keyframes[keyFrame] - } else { - leadingKeyframe = nil - } - - if let keyFrame = trailingIndex { - trailingKeyframe = keyframes[keyFrame] - } else { - trailingKeyframe = nil - } - } -} - -extension Array { - - fileprivate func validIndex(_ index: Int) -> Int? { - if 0 <= index, index < endIndex { - return index - } - return nil - } - -} - -extension ContiguousArray { - - fileprivate func validIndex(_ index: Int) -> Int? { - if 0 <= index, index < endIndex { - return index - } - return nil - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/BezierPath.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/BezierPath.swift deleted file mode 100644 index f15012b..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/BezierPath.swift +++ /dev/null @@ -1,487 +0,0 @@ -// -// Shape.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/8/19. -// - -import CoreGraphics -import Foundation - -// MARK: - BezierPath - -/// A container that holds instructions for creating a single, unbroken Bezier Path. -struct BezierPath { - - // MARK: Lifecycle - - /// Initializes a new Bezier Path. - init(startPoint: CurveVertex) { - elements = [PathElement(vertex: startPoint)] - length = 0 - closed = false - } - - init() { - elements = [] - length = 0 - closed = false - } - - // MARK: Internal - - /// The elements of the path - private(set) var elements: [PathElement] - - /// If the path is closed or not. - private(set) var closed: Bool - - /// The total length of the path. - private(set) var length: CGFloat - - mutating func moveToStartPoint(_ vertex: CurveVertex) { - elements = [PathElement(vertex: vertex)] - length = 0 - } - - mutating func addVertex(_ vertex: CurveVertex) { - guard let previous = elements.last else { - addElement(PathElement(vertex: vertex)) - return - } - addElement(previous.pathElementTo(vertex)) - } - - mutating func addCurve(toPoint: CGPoint, outTangent: CGPoint, inTangent: CGPoint) { - guard let previous = elements.last else { return } - let newVertex = CurveVertex(inTangent, toPoint, toPoint) - updateVertex( - CurveVertex(previous.vertex.inTangent, previous.vertex.point, outTangent), - atIndex: elements.endIndex - 1, - remeasure: false) - addVertex(newVertex) - } - - mutating func addLine(toPoint: CGPoint) { - guard let previous = elements.last else { return } - let newVertex = CurveVertex(point: toPoint, inTangentRelative: .zero, outTangentRelative: .zero) - updateVertex( - CurveVertex(previous.vertex.inTangent, previous.vertex.point, previous.vertex.point), - atIndex: elements.endIndex - 1, - remeasure: false) - addVertex(newVertex) - } - - mutating func close() { - closed = true - } - - mutating func addElement(_ pathElement: PathElement) { - elements.append(pathElement) - length = length + pathElement.length - } - - mutating func updateVertex(_ vertex: CurveVertex, atIndex: Int, remeasure: Bool) { - if remeasure { - var newElement: PathElement - if atIndex > 0 { - let previousElement = elements[atIndex - 1] - newElement = previousElement.pathElementTo(vertex) - } else { - newElement = PathElement(vertex: vertex) - } - elements[atIndex] = newElement - - if atIndex + 1 < elements.count { - let nextElement = elements[atIndex + 1] - elements[atIndex + 1] = newElement.pathElementTo(nextElement.vertex) - } - - } else { - let oldElement = elements[atIndex] - elements[atIndex] = oldElement.updateVertex(newVertex: vertex) - } - } - - /// Trims a path fromLength toLength with an offset. - /// - /// Length and offset are defined in the length coordinate space. - /// If any argument is outside the range of this path, then it will be looped over the path from finish to start. - /// - /// Cutting the curve when fromLength is less than toLength - /// x x x x - /// ~~~~~~~~~~~~~~~ooooooooooooooooooooooooooooooooooooooooooooooooo------------------- - /// |Offset |fromLength toLength| | - /// - /// Cutting the curve when from Length is greater than toLength - /// x x x x x - /// oooooooooooooooooo--------------------~~~~~~~~~~~~~~~~ooooooooooooooooooooooooooooo - /// | toLength| |Offset |fromLength | - /// - func trim(fromLength: CGFloat, toLength: CGFloat, offsetLength: CGFloat) -> [BezierPath] { - guard elements.count > 1 else { - return [] - } - - if fromLength == toLength { - return [] - } - - /// Normalize lengths to the curve length. - var start = (fromLength + offsetLength).truncatingRemainder(dividingBy: length) - var end = (toLength + offsetLength).truncatingRemainder(dividingBy: length) - - if start < 0 { - start = length + start - } - - if end < 0 { - end = length + end - } - - if start == length { - start = 0 - } - if end == 0 { - end = length - } - - if - start == 0 && end == length || - start == end || - start == length && end == 0 - { - /// The trim encompasses the entire path. Return. - return [self] - } - - if start > end { - // Start is greater than end. Two paths are returned. - return trimPathAtLengths(positions: [(start: 0, end: end), (start: start, end: length)]) - } - - return trimPathAtLengths(positions: [(start: start, end: end)]) - } - - // MARK: Private - - private func trimPathAtLengths(positions: [(start: CGFloat, end: CGFloat)]) -> [BezierPath] { - guard positions.count > 0 else { - return [] - } - var remainingPositions = positions - - var trim = remainingPositions.remove(at: 0) - - var paths = [BezierPath]() - - var runningLength: CGFloat = 0 - var finishedTrimming = false - var pathElements = elements - - var currentPath = BezierPath() - var i = 0 - - while !finishedTrimming { - if pathElements.count <= i { - /// Do this for rounding errors - paths.append(currentPath) - finishedTrimming = true - continue - } - /// Loop through and add elements within start->end range. - /// Get current element - let element = pathElements[i] - - /// Calculate new running length. - let newLength = runningLength + element.length - - if newLength < trim.start { - /// Element is not included in the trim, continue. - runningLength = newLength - i = i + 1 - /// Increment index, we are done with this element. - continue - } - - if newLength == trim.start { - /// Current element IS the start element. - /// For start we want to add a zero length element. - currentPath.moveToStartPoint(element.vertex) - runningLength = newLength - i = i + 1 - /// Increment index, we are done with this element. - continue - } - - if runningLength < trim.start, trim.start < newLength, currentPath.elements.count == 0 { - /// The start of the trim is between this element and the previous, trim. - /// Get previous element. - let previousElement = pathElements[i - 1] - /// Trim it - let trimLength = trim.start - runningLength - let trimResults = element.splitElementAtPosition(fromElement: previousElement, atLength: trimLength) - /// Add the right span start. - currentPath.moveToStartPoint(trimResults.rightSpan.start.vertex) - - pathElements[i] = trimResults.rightSpan.end - pathElements[i - 1] = trimResults.rightSpan.start - runningLength = runningLength + trimResults.leftSpan.end.length - /// Dont increment index or the current length, the end of this path can be within this span. - continue - } - - if trim.start < newLength, newLength < trim.end { - /// Element lies within the trim span. - currentPath.addElement(element) - runningLength = newLength - i = i + 1 - continue - } - - if newLength == trim.end { - /// Element is the end element. - /// The element could have a new length if it's added right after the start node. - currentPath.addElement(element) - /// We are done with this span. - runningLength = newLength - i = i + 1 - /// Allow the path to be finalized. - /// Fall through to finalize path and move to next position - } - - if runningLength < trim.end, trim.end < newLength { - /// New element must be cut for end. - /// Get previous element. - let previousElement = pathElements[i - 1] - /// Trim it - let trimLength = trim.end - runningLength - let trimResults = element.splitElementAtPosition(fromElement: previousElement, atLength: trimLength) - /// Add the left span end. - - currentPath.updateVertex(trimResults.leftSpan.start.vertex, atIndex: currentPath.elements.count - 1, remeasure: false) - currentPath.addElement(trimResults.leftSpan.end) - - pathElements[i] = trimResults.rightSpan.end - pathElements[i - 1] = trimResults.rightSpan.start - runningLength = runningLength + trimResults.leftSpan.end.length - /// Dont increment index or the current length, the start of the next path can be within this span. - /// We are done with this span. - /// Allow the path to be finalized. - /// Fall through to finalize path and move to next position - } - - paths.append(currentPath) - currentPath = BezierPath() - if remainingPositions.count > 0 { - trim = remainingPositions.remove(at: 0) - } else { - finishedTrimming = true - } - } - return paths - } - -} - -// MARK: Codable - -extension BezierPath: Codable { - - // MARK: Lifecycle - - init(from decoder: Decoder) throws { - let container: KeyedDecodingContainer - - if let keyedContainer = try? decoder.container(keyedBy: BezierPath.CodingKeys.self) { - container = keyedContainer - } else { - var unkeyedContainer = try decoder.unkeyedContainer() - container = try unkeyedContainer.nestedContainer(keyedBy: BezierPath.CodingKeys.self) - } - - closed = try container.decodeIfPresent(Bool.self, forKey: .closed) ?? true - - var vertexContainer = try container.nestedUnkeyedContainer(forKey: .vertices) - var inPointsContainer = try container.nestedUnkeyedContainer(forKey: .inPoints) - var outPointsContainer = try container.nestedUnkeyedContainer(forKey: .outPoints) - - guard vertexContainer.count == inPointsContainer.count, inPointsContainer.count == outPointsContainer.count else { - /// Will throw an error if vertex, inpoints, and outpoints are not the same length. - /// This error is to be expected. - throw DecodingError.dataCorruptedError( - forKey: CodingKeys.vertices, - in: container, - debugDescription: "Vertex data does not match In Tangents and Out Tangents") - } - - guard let count = vertexContainer.count, count > 0 else { - length = 0 - elements = [] - return - } - - var decodedElements = [PathElement]() - - /// Create first point - let firstVertex = CurveVertex( - point: try vertexContainer.decode(CGPoint.self), - inTangentRelative: try inPointsContainer.decode(CGPoint.self), - outTangentRelative: try outPointsContainer.decode(CGPoint.self)) - var previousElement = PathElement(vertex: firstVertex) - decodedElements.append(previousElement) - - var totalLength: CGFloat = 0 - while !vertexContainer.isAtEnd { - /// Get the next vertex data. - let vertex = CurveVertex( - point: try vertexContainer.decode(CGPoint.self), - inTangentRelative: try inPointsContainer.decode(CGPoint.self), - outTangentRelative: try outPointsContainer.decode(CGPoint.self)) - let pathElement = previousElement.pathElementTo(vertex) - decodedElements.append(pathElement) - previousElement = pathElement - totalLength = totalLength + pathElement.length - } - if closed { - let closeElement = previousElement.pathElementTo(firstVertex) - decodedElements.append(closeElement) - totalLength = totalLength + closeElement.length - } - length = totalLength - elements = decodedElements - } - - // MARK: Internal - - /// The BezierPath container is encoded and decoded from the JSON format - /// that defines points for a lottie animation. - /// - /// { - /// "c" = Bool - /// "i" = [[Double]], - /// "o" = [[Double]], - /// "v" = [[Double]] - /// } - /// - - enum CodingKeys: String, CodingKey { - case closed = "c" - case inPoints = "i" - case outPoints = "o" - case vertices = "v" - } - - func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: BezierPath.CodingKeys.self) - try container.encode(closed, forKey: .closed) - - var vertexContainer = container.nestedUnkeyedContainer(forKey: .vertices) - var inPointsContainer = container.nestedUnkeyedContainer(forKey: .inPoints) - var outPointsContainer = container.nestedUnkeyedContainer(forKey: .outPoints) - - /// If closed path, ignore the final element. - let finalIndex = closed ? elements.endIndex - 1 : elements.endIndex - for i in 0.. 0 else { - length = 0 - elements = [] - return - } - - var decodedElements = [PathElement]() - let firstVertexDictionary = vertexDictionaries.removeFirst() - let firstInPointsDictionary = inPointsDictionaries.removeFirst() - let firstOutPointsDictionary = outPointsDictionaries.removeFirst() - let firstVertex = CurveVertex( - point: try CGPoint(value: firstVertexDictionary), - inTangentRelative: try CGPoint(value: firstInPointsDictionary), - outTangentRelative: try CGPoint(value: firstOutPointsDictionary)) - var previousElement = PathElement(vertex: firstVertex) - decodedElements.append(previousElement) - - var totalLength: CGFloat = 0 - while vertexDictionaries.count > 0 { - let vertexDictionary = vertexDictionaries.removeFirst() - let inPointsDictionary = inPointsDictionaries.removeFirst() - let outPointsDictionary = outPointsDictionaries.removeFirst() - let vertex = CurveVertex( - point: try CGPoint(value: vertexDictionary), - inTangentRelative: try CGPoint(value: inPointsDictionary), - outTangentRelative: try CGPoint(value: outPointsDictionary)) - let pathElement = previousElement.pathElementTo(vertex) - decodedElements.append(pathElement) - previousElement = pathElement - totalLength = totalLength + pathElement.length - } - if closed { - let closeElement = previousElement.pathElementTo(firstVertex) - decodedElements.append(closeElement) - totalLength = totalLength + closeElement.length - } - - length = totalLength - elements = decodedElements - } - -} - -extension BezierPath { - - func cgPath() -> CGPath { - let cgPath = CGMutablePath() - - var previousElement: PathElement? - for element in elements { - if let previous = previousElement { - if previous.vertex.outTangentRelative.isZero, element.vertex.inTangentRelative.isZero { - cgPath.addLine(to: element.vertex.point) - } else { - cgPath.addCurve(to: element.vertex.point, control1: previous.vertex.outTangent, control2: element.vertex.inTangent) - } - } else { - cgPath.move(to: element.vertex.point) - } - previousElement = element - } - if closed { - cgPath.closeSubpath() - } - return cgPath - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/BezierPathRoundExtension.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/BezierPathRoundExtension.swift deleted file mode 100644 index eca89f0..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/BezierPathRoundExtension.swift +++ /dev/null @@ -1,158 +0,0 @@ -// -// BezierPathRoundExtension.swift -// Lottie -// -// Created by Duolingo on 11/1/22. -// - -import CoreGraphics -import Foundation - -// Adapted to Swift from lottie-web & lottie-android: - -// Rounded corner algorithm: -// Iterate through each vertex. -// If a vertex is a sharp corner, it rounds it. -// If a vertex has control points, it is already rounded, so it does nothing. -// -// To round a vertex: -// Split the vertex into two. -// Move vertex 1 directly towards the previous vertex. -// Set vertex 1's in control point to itself so it is not rounded on that side. -// Extend vertex 1's out control point towards the original vertex. -// -// Repeat for vertex 2: -// Move vertex 2 directly towards the next vertex. -// Set vertex 2's out point to itself so it is not rounded on that side. -// Extend vertex 2's in control point towards the original vertex. -// -// The distance that the vertices and control points are moved are relative to the -// shape's vertex distances and the roundedness set in the animation. - -extension CompoundBezierPath { - // Round corners of a compound bezier - func roundCorners(radius: CGFloat) -> CompoundBezierPath { - var newPaths = [BezierPath]() - for path in paths { - newPaths.append( - path.roundCorners(radius: radius)) - } - - return CompoundBezierPath(paths: newPaths) - } -} - -extension BezierPath { - // Computes a new `BezierPath` with each corner rounded based on the given `radius` - func roundCorners(radius: CGFloat) -> BezierPath { - var newPath = BezierPath() - var uniquePath = BezierPath() - - var currentVertex: CurveVertex - var closestVertex: CurveVertex - var distance: CGFloat - var newPosPerc: CGFloat - var closestIndex: Int - - var iX: CGFloat - var iY: CGFloat - var vX: CGFloat - var vY: CGFloat - var oX: CGFloat - var oY: CGFloat - - var startIndex = 0 - - let TANGENT_LENGTH = 0.5519 - - // If start and end are the same we close the path - if - elements[0].vertex.point == elements[elements.count - 1].vertex.point, - elements[0].vertex.inTangent == elements[elements.count - 1].vertex.inTangent, - elements[0].vertex.outTangent == elements[elements.count - 1].vertex.outTangent - { - startIndex = 1 - newPath.close() - } - - guard elements.count - startIndex > 1 else { - return self - } - - for i in startIndex.. 1 - { - self.init(x: array[0], y: array[1]) - } else { - throw InitializableError.invalidInput - } - } - - // MARK: Private - - private enum CodingKeys: String { - case x - case y - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/ColorExtension.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/ColorExtension.swift deleted file mode 100644 index 936fb2b..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/ColorExtension.swift +++ /dev/null @@ -1,102 +0,0 @@ -// -// LottieColor.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/14/19. -// - -import CoreGraphics -import Foundation - -// MARK: - LottieColor + Codable - -extension LottieColor: Codable { - - // MARK: Lifecycle - - public init(from decoder: Decoder) throws { - var container = try decoder.unkeyedContainer() - - var r1: Double - if !container.isAtEnd { - r1 = try container.decode(Double.self) - } else { - r1 = 0 - } - - var g1: Double - if !container.isAtEnd { - g1 = try container.decode(Double.self) - } else { - g1 = 0 - } - - var b1: Double - if !container.isAtEnd { - b1 = try container.decode(Double.self) - } else { - b1 = 0 - } - - if r1 > 1, g1 > 1, b1 > 1 { - r1 = r1 / 255 - g1 = g1 / 255 - b1 = b1 / 255 - } - r = r1 - g = g1 - b = b1 - - // The Lottie JSON schema supports alpha values in theory, as the fourth value in this array. - // We intentionally do not support this, though, for consistency with Lottie on other platforms. - a = 1 - } - - // MARK: Public - - public func encode(to encoder: Encoder) throws { - var container = encoder.unkeyedContainer() - try container.encode(r) - try container.encode(g) - try container.encode(b) - try container.encode(a) - } - -} - -// MARK: - LottieColor + AnyInitializable - -extension LottieColor: AnyInitializable { - - init(value: Any) throws { - guard var array = value as? [Double] else { - throw InitializableError.invalidInput - } - var r: Double = array.count > 0 ? array.removeFirst() : 0 - var g: Double = array.count > 0 ? array.removeFirst() : 0 - var b: Double = array.count > 0 ? array.removeFirst() : 0 - if r > 1, g > 1, b > 1 { - r /= 255 - g /= 255 - b /= 255 - } - self.r = r - self.g = g - self.b = b - - // The Lottie JSON schema supports alpha values in theory, as the fourth value in this array. - // We intentionally do not support this, though, for consistency with Lottie on other platforms. - a = 1 - } - -} - -extension LottieColor { - static var clearColor: CGColor { - .rgba(0, 0, 0, 0) - } - - var cgColorValue: CGColor { - .rgba(CGFloat(r), CGFloat(g), CGFloat(b), CGFloat(a)) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/CompoundBezierPath.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/CompoundBezierPath.swift deleted file mode 100644 index 14e465d..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/CompoundBezierPath.swift +++ /dev/null @@ -1,167 +0,0 @@ -// -// CompoundBezierPath.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/14/19. -// - -import CoreGraphics -import Foundation - -/// A collection of BezierPath objects that can be trimmed and added. -/// -struct CompoundBezierPath { - - // MARK: Lifecycle - - init() { - paths = [] - length = 0 - } - - init(path: BezierPath) { - paths = [path] - length = path.length - } - - init(paths: [BezierPath], length: CGFloat) { - self.paths = paths - self.length = length - } - - init(paths: [BezierPath]) { - self.paths = paths - var l: CGFloat = 0 - for path in paths { - l = l + path.length - } - length = l - } - - // MARK: Internal - - let paths: [BezierPath] - - let length: CGFloat - - func addPath(path: BezierPath) -> CompoundBezierPath { - var newPaths = paths - newPaths.append(path) - return CompoundBezierPath(paths: newPaths, length: length + path.length) - } - - func combine(_ compoundBezier: CompoundBezierPath) -> CompoundBezierPath { - var newPaths = paths - newPaths.append(contentsOf: compoundBezier.paths) - return CompoundBezierPath(paths: newPaths, length: length + compoundBezier.length) - } - - func trim(fromPosition: CGFloat, toPosition: CGFloat, offset: CGFloat, trimSimultaneously: Bool) -> CompoundBezierPath { - if fromPosition == toPosition { - return CompoundBezierPath() - } - - if trimSimultaneously { - /// Trim each path individually. - var newPaths = [BezierPath]() - for path in paths { - newPaths.append(contentsOf: path.trim( - fromLength: fromPosition * path.length, - toLength: toPosition * path.length, - offsetLength: offset * path.length)) - } - return CompoundBezierPath(paths: newPaths) - } - - /// Normalize lengths to the curve length. - var startPosition = (fromPosition + offset).truncatingRemainder(dividingBy: 1) - var endPosition = (toPosition + offset).truncatingRemainder(dividingBy: 1) - - if startPosition < 0 { - startPosition = 1 + startPosition - } - - if endPosition < 0 { - endPosition = 1 + endPosition - } - - if startPosition == 1 { - startPosition = 0 - } - if endPosition == 0 { - endPosition = 1 - } - - if - startPosition == 0 && endPosition == 1 || - startPosition == endPosition || - startPosition == 1 && endPosition == 0 - { - /// The trim encompasses the entire path. Return. - return self - } - - var positions: [(start: CGFloat, end: CGFloat)] - if endPosition < startPosition { - positions = [ - (start: 0, end: endPosition * length), - (start: startPosition * length, end: length), - ] - } else { - positions = [(start: startPosition * length, end: endPosition * length)] - } - - var compoundPath = CompoundBezierPath() - var trim = positions.remove(at: 0) - var pathStartPosition: CGFloat = 0 - - var finishedTrimming = false - var i = 0 - - while !finishedTrimming { - if paths.count <= i { - /// Rounding errors - finishedTrimming = true - continue - } - let path = paths[i] - - let pathEndPosition = pathStartPosition + path.length - - if pathEndPosition < trim.start { - /// Path is not included in the trim, continue. - pathStartPosition = pathEndPosition - i = i + 1 - continue - - } else if trim.start <= pathStartPosition, pathEndPosition <= trim.end { - /// Full Path is inside of trim. Add full path. - compoundPath = compoundPath.addPath(path: path) - } else { - if - let trimPath = path.trim( - fromLength: trim.start > pathStartPosition ? (trim.start - pathStartPosition) : 0, - toLength: trim.end < pathEndPosition ? (trim.end - pathStartPosition) : path.length, - offsetLength: 0).first - { - compoundPath = compoundPath.addPath(path: trimPath) - } - } - - if trim.end <= pathEndPosition { - /// We are done with the current trim. - /// Advance trim but remain on the same path in case the next trim overlaps it. - if positions.count > 0 { - trim = positions.remove(at: 0) - } else { - finishedTrimming = true - } - } else { - pathStartPosition = pathEndPosition - i = i + 1 - } - } - return compoundPath - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/CurveVertex.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/CurveVertex.swift deleted file mode 100644 index 32afadb..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/CurveVertex.swift +++ /dev/null @@ -1,184 +0,0 @@ -// -// CurveVertex.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/11/19. -// - -import CoreGraphics -import Foundation - -/// A single vertex with an in and out tangent -struct CurveVertex { - - // MARK: Lifecycle - - /// Initializes a curve point with absolute values - init(_ inTangent: CGPoint, _ point: CGPoint, _ outTangent: CGPoint) { - self.point = point - self.inTangent = inTangent - self.outTangent = outTangent - } - - /// Initializes a curve point with relative values - init(point: CGPoint, inTangentRelative: CGPoint, outTangentRelative: CGPoint) { - self.point = point - inTangent = point.add(inTangentRelative) - outTangent = point.add(outTangentRelative) - } - - /// Initializes a curve point with absolute values - init(point: CGPoint, inTangent: CGPoint, outTangent: CGPoint) { - self.point = point - self.inTangent = inTangent - self.outTangent = outTangent - } - - // MARK: Internal - - let point: CGPoint - - let inTangent: CGPoint - let outTangent: CGPoint - - var inTangentRelative: CGPoint { - inTangent.subtract(point) - } - - var outTangentRelative: CGPoint { - outTangent.subtract(point) - } - - func reversed() -> CurveVertex { - CurveVertex(point: point, inTangent: outTangent, outTangent: inTangent) - } - - func translated(_ translation: CGPoint) -> CurveVertex { - CurveVertex(point: point + translation, inTangent: inTangent + translation, outTangent: outTangent + translation) - } - - /// Trims a path defined by two Vertices at a specific position, from 0 to 1 - /// - /// The path can be visualized below. - /// - /// F is fromVertex. - /// V is the vertex of the receiver. - /// P is the position from 0-1. - /// O is the outTangent of fromVertex. - /// F====O=========P=======I====V - /// - /// After trimming the curve can be visualized below. - /// - /// S is the returned Start vertex. - /// E is the returned End vertex. - /// T is the trim point. - /// TI and TO are the new tangents for the trimPoint - /// NO and NI are the new tangents for the startPoint and endPoints - /// S==NO=========TI==T==TO=======NI==E - func splitCurve(toVertex: CurveVertex, position: CGFloat) -> - (start: CurveVertex, trimPoint: CurveVertex, end: CurveVertex) - { - /// If position is less than or equal to 0, trim at start. - if position <= 0 { - return ( - start: CurveVertex(point: point, inTangentRelative: inTangentRelative, outTangentRelative: .zero), - trimPoint: CurveVertex(point: point, inTangentRelative: .zero, outTangentRelative: outTangentRelative), - end: toVertex) - } - - /// If position is greater than or equal to 1, trim at end. - if position >= 1 { - return ( - start: self, - trimPoint: CurveVertex( - point: toVertex.point, - inTangentRelative: toVertex.inTangentRelative, - outTangentRelative: .zero), - end: CurveVertex( - point: toVertex.point, - inTangentRelative: .zero, - outTangentRelative: toVertex.outTangentRelative)) - } - - if outTangentRelative.isZero, toVertex.inTangentRelative.isZero { - /// If both tangents are zero, then span to be trimmed is a straight line. - let trimPoint = point.interpolate(to: toVertex.point, amount: position) - return ( - start: self, - trimPoint: CurveVertex(point: trimPoint, inTangentRelative: .zero, outTangentRelative: .zero), - end: toVertex) - } - /// Cutting by amount gives incorrect length.... - /// One option is to cut by a stride until it gets close then edge it down. - /// Measuring a percentage of the spans does not equal the same as measuring a percentage of length. - /// This is where the historical trim path bugs come from. - let a = point.interpolate(to: outTangent, amount: position) - let b = outTangent.interpolate(to: toVertex.inTangent, amount: position) - let c = toVertex.inTangent.interpolate(to: toVertex.point, amount: position) - let d = a.interpolate(to: b, amount: position) - let e = b.interpolate(to: c, amount: position) - let f = d.interpolate(to: e, amount: position) - return ( - start: CurveVertex(point: point, inTangent: inTangent, outTangent: a), - trimPoint: CurveVertex(point: f, inTangent: d, outTangent: e), - end: CurveVertex(point: toVertex.point, inTangent: c, outTangent: toVertex.outTangent)) - } - - /// Trims a curve of a known length to a specific length and returns the points. - /// - /// There is not a performant yet accurate way to cut a curve to a specific length. - /// This calls splitCurve(toVertex: position:) to split the curve and then measures - /// the length of the new curve. The function then iterates through the samples, - /// adjusting the position of the cut for a more precise cut. - /// Usually a single iteration is enough to get within 0.5 points of the desired - /// length. - /// - /// This function should probably live in PathElement, since it deals with curve - /// lengths. - func trimCurve(toVertex: CurveVertex, atLength: CGFloat, curveLength: CGFloat, maxSamples: Int, accuracy: CGFloat = 1) -> - (start: CurveVertex, trimPoint: CurveVertex, end: CurveVertex) - { - var currentPosition = atLength / curveLength - var results = splitCurve(toVertex: toVertex, position: currentPosition) - - if maxSamples == 0 { - return results - } - - for _ in 1...maxSamples { - let length = results.start.distanceTo(results.trimPoint) - let lengthDiff = atLength - length - /// Check if length is correct. - if lengthDiff < accuracy { - return results - } - let diffPosition = max(min((currentPosition / length) * lengthDiff, currentPosition * 0.5), currentPosition * -0.5) - currentPosition = diffPosition + currentPosition - results = splitCurve(toVertex: toVertex, position: currentPosition) - } - return results - } - - /// The distance from the receiver to the provided vertex. - /// - /// For lines (zeroed tangents) the distance between the two points is measured. - /// For curves the curve is iterated over by sample count and the points are measured. - /// This is ~99% accurate at a sample count of 30 - func distanceTo(_ toVertex: CurveVertex, sampleCount: Int = 25) -> CGFloat { - if outTangentRelative.isZero, toVertex.inTangentRelative.isZero { - /// Return a linear distance. - return point.distanceTo(toVertex.point) - } - - var distance: CGFloat = 0 - - var previousPoint = point - for i in 0.. PathElement { - PathElement(length: vertex.distanceTo(toVertex), vertex: toVertex) - } - - func updateVertex(newVertex: CurveVertex) -> PathElement { - PathElement(length: length, vertex: newVertex) - } - - /// Splits an element span defined by the receiver and fromElement to a position 0-1 - func splitElementAtPosition(fromElement: PathElement, atLength: CGFloat) -> - (leftSpan: (start: PathElement, end: PathElement), rightSpan: (start: PathElement, end: PathElement)) - { - /// Trim the span. Start and trim go into the first, trim and end go into second. - let trimResults = fromElement.vertex.trimCurve(toVertex: vertex, atLength: atLength, curveLength: length, maxSamples: 3) - - /// Create the elements for the break - let spanAStart = PathElement( - length: fromElement.length, - vertex: CurveVertex( - point: fromElement.vertex.point, - inTangent: fromElement.vertex.inTangent, - outTangent: trimResults.start.outTangent)) - /// Recalculating the length here is a waste as the trimCurve function also accurately calculates this length. - let spanAEnd = spanAStart.pathElementTo(trimResults.trimPoint) - - let spanBStart = PathElement(vertex: trimResults.trimPoint) - let spanBEnd = spanBStart.pathElementTo(trimResults.end) - return ( - leftSpan: (start: spanAStart, end: spanAEnd), - rightSpan: (start: spanBStart, end: spanBEnd)) - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/UnitBezier.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/UnitBezier.swift deleted file mode 100644 index 8b14fa1..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/UnitBezier.swift +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (C) 2008 Apple Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import CoreGraphics -import Foundation - -/// Defines a cubic-bezier where the endpoints are (0, 0) and (1, 1) -/// -/// The main use case is computing the progress of an animation at a given percent completion. For instance, -/// for a linear animation, the expected progress at `0.5` is `0.5`. -/// -/// - Note: This is a Swift port of [Apple's WebKit code]( -/// http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/platform/graphics/UnitBezier.h -/// ) -/// -struct UnitBezier { - - // MARK: Lifecycle - - init(controlPoint1: CGPoint, controlPoint2: CGPoint) { - cx = 3.0 * controlPoint1.x - bx = 3.0 * (controlPoint2.x - controlPoint1.x) - cx - ax = 1.0 - cx - bx - cy = 3.0 * controlPoint1.y - by = 3.0 * (controlPoint2.y - controlPoint1.y) - cy - ay = 1.0 - cy - by - } - - // MARK: Internal - - /// Computes the progress `y` value for a given `x` value - func value(for x: CGFloat, epsilon: CGFloat) -> CGFloat { - sampleCurveY(solveCurveX(x, epsilon: epsilon)) - } - - // MARK: Private - - private let ax: CGFloat - private let bx: CGFloat - private let cx: CGFloat - private let ay: CGFloat - private let by: CGFloat - private let cy: CGFloat - - /// Compute `x(t)` for a given `t` - private func sampleCurveX(_ t: CGFloat) -> CGFloat { - // `ax t^3 + bx t^2 + cx t' expanded using Horner's rule. - ((ax * t + bx) * t + cx) * t - } - - /// Compute `y(t)` for a given `t` - private func sampleCurveY(_ t: CGFloat) -> CGFloat { - ((ay * t + by) * t + cy) * t - } - - /// Compute `x'(t)` for a given `t` - private func sampleCurveDerivativeX(_ t: CGFloat) -> CGFloat { - (3.0 * ax * t + 2.0 * bx) * t + cx - } - - /// Given an `x` value solve for the parametric value `t` - private func solveCurveX(_ x: CGFloat, epsilon: CGFloat) -> CGFloat { - var t0, t1, t2, x2, d2: CGFloat - - // First try a few iterations of Newton-Raphson -- normally very fast. - t2 = x - for _ in 0..<8 { - x2 = sampleCurveX(t2) - x - guard abs(x2) >= epsilon else { return t2 } - d2 = sampleCurveDerivativeX(t2) - guard abs(d2) >= 1e-6 else { break } - t2 = t2 - x2 / d2 - } - - // Fall back to the bisection method for reliability. - t0 = 0.0 - t1 = 1.0 - t2 = x - guard t2 >= t0 else { return t0 } - guard t2 <= t1 else { return t1 } - - while t0 < t1 { - x2 = sampleCurveX(t2) - guard abs(x2 - x) >= epsilon else { return t2 } - if x > x2 { - t0 = t2 - } else { - t1 = t2 - } - t2 = (t1 - t0) * 0.5 + t0 - } - - return t2 - } -} diff --git a/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/VectorsExtensions.swift b/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/VectorsExtensions.swift deleted file mode 100644 index 118b4ee..0000000 --- a/Example/Pods/lottie-ios/Sources/Private/Utility/Primitives/VectorsExtensions.swift +++ /dev/null @@ -1,363 +0,0 @@ -// -// Vector.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/7/19. -// - -import CoreGraphics -import Foundation -import QuartzCore - -// MARK: - LottieVector1D + Codable - -/// Single value container. Needed because lottie sometimes wraps a Double in an array. -extension LottieVector1D: Codable { - - // MARK: Lifecycle - - public init(from decoder: Decoder) throws { - /// Try to decode an array of doubles - do { - var container = try decoder.unkeyedContainer() - value = try container.decode(Double.self) - } catch { - value = try decoder.singleValueContainer().decode(Double.self) - } - } - - // MARK: Public - - public func encode(to encoder: Encoder) throws { - var container = encoder.singleValueContainer() - try container.encode(value) - } - - // MARK: Internal - - var cgFloatValue: CGFloat { - CGFloat(value) - } - -} - -// MARK: - LottieVector1D + AnyInitializable - -extension LottieVector1D: AnyInitializable { - - init(value: Any) throws { - if - let array = value as? [Double], - let double = array.first - { - self.value = double - } else if let double = value as? Double { - self.value = double - } else { - throw InitializableError.invalidInput - } - } - -} - -extension Double { - var vectorValue: LottieVector1D { - LottieVector1D(self) - } -} - -// MARK: - LottieVector2D - -/// Needed for decoding json {x: y:} to a CGPoint -public struct LottieVector2D: Codable, Hashable { - - // MARK: Lifecycle - - init(x: Double, y: Double) { - self.x = x - self.y = y - } - - public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: LottieVector2D.CodingKeys.self) - - do { - let xValue: [Double] = try container.decode([Double].self, forKey: .x) - x = xValue[0] - } catch { - x = try container.decode(Double.self, forKey: .x) - } - - do { - let yValue: [Double] = try container.decode([Double].self, forKey: .y) - y = yValue[0] - } catch { - y = try container.decode(Double.self, forKey: .y) - } - } - - // MARK: Public - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: LottieVector2D.CodingKeys.self) - try container.encode(x, forKey: .x) - try container.encode(y, forKey: .y) - } - - // MARK: Internal - - var x: Double - var y: Double - - var pointValue: CGPoint { - CGPoint(x: x, y: y) - } - - // MARK: Private - - private enum CodingKeys: String, CodingKey { - case x - case y - } -} - -// MARK: AnyInitializable - -extension LottieVector2D: AnyInitializable { - - init(value: Any) throws { - guard let dictionary = value as? [String: Any] else { - throw InitializableError.invalidInput - } - - if - let array = dictionary[CodingKeys.x.rawValue] as? [Double], - let double = array.first - { - x = double - } else if let double = dictionary[CodingKeys.x.rawValue] as? Double { - x = double - } else { - throw InitializableError.invalidInput - } - if - let array = dictionary[CodingKeys.y.rawValue] as? [Double], - let double = array.first - { - y = double - } else if let double = dictionary[CodingKeys.y.rawValue] as? Double { - y = double - } else { - throw InitializableError.invalidInput - } - } -} - -extension CGPoint { - var vector2dValue: LottieVector2D { - LottieVector2D(x: Double(x), y: Double(y)) - } -} - -// MARK: - LottieVector3D + Codable - -/// A three dimensional vector. -/// These vectors are encoded and decoded from [Double] - -extension LottieVector3D: Codable { - - // MARK: Lifecycle - - init(x: CGFloat, y: CGFloat, z: CGFloat) { - self.x = Double(x) - self.y = Double(y) - self.z = Double(z) - } - - public init(from decoder: Decoder) throws { - var container = try decoder.unkeyedContainer() - - if !container.isAtEnd { - x = try container.decode(Double.self) - } else { - x = 0 - } - - if !container.isAtEnd { - y = try container.decode(Double.self) - } else { - y = 0 - } - - if !container.isAtEnd { - z = try container.decode(Double.self) - } else { - z = 0 - } - } - - // MARK: Public - - public func encode(to encoder: Encoder) throws { - var container = encoder.unkeyedContainer() - try container.encode(x) - try container.encode(y) - try container.encode(z) - } - -} - -// MARK: - LottieVector3D + AnyInitializable - -extension LottieVector3D: AnyInitializable { - - init(value: Any) throws { - guard var array = value as? [Double] else { - throw InitializableError.invalidInput - } - x = array.count > 0 ? array.removeFirst() : 0 - y = array.count > 0 ? array.removeFirst() : 0 - z = array.count > 0 ? array.removeFirst() : 0 - } - -} - -extension LottieVector3D { - public var pointValue: CGPoint { - CGPoint(x: x, y: y) - } - - public var sizeValue: CGSize { - CGSize(width: x, height: y) - } -} - -extension CGPoint { - var vector3dValue: LottieVector3D { - LottieVector3D(x: x, y: y, z: 0) - } -} - -extension CGSize { - var vector3dValue: LottieVector3D { - LottieVector3D(x: width, y: height, z: 1) - } -} - -extension CATransform3D { - - enum Axis { - case x, y, z - } - - static func makeSkew(skew: CGFloat, skewAxis: CGFloat) -> CATransform3D { - let mCos = cos(skewAxis.toRadians()) - let mSin = sin(skewAxis.toRadians()) - let aTan = tan(skew.toRadians()) - - let transform1 = CATransform3D( - m11: mCos, - m12: mSin, - m13: 0, - m14: 0, - m21: -mSin, - m22: mCos, - m23: 0, - m24: 0, - m31: 0, - m32: 0, - m33: 1, - m34: 0, - m41: 0, - m42: 0, - m43: 0, - m44: 1) - - let transform2 = CATransform3D( - m11: 1, - m12: 0, - m13: 0, - m14: 0, - m21: aTan, - m22: 1, - m23: 0, - m24: 0, - m31: 0, - m32: 0, - m33: 1, - m34: 0, - m41: 0, - m42: 0, - m43: 0, - m44: 1) - - let transform3 = CATransform3D( - m11: mCos, - m12: -mSin, - m13: 0, - m14: 0, - m21: mSin, - m22: mCos, - m23: 0, - m24: 0, - m31: 0, - m32: 0, - m33: 1, - m34: 0, - m41: 0, - m42: 0, - m43: 0, - m44: 1) - return CATransform3DConcat(transform3, CATransform3DConcat(transform2, transform1)) - } - - static func makeTransform( - anchor: CGPoint, - position: CGPoint, - scale: CGSize, - rotationX: CGFloat, - rotationY: CGFloat, - rotationZ: CGFloat, - skew: CGFloat?, - skewAxis: CGFloat?) - -> CATransform3D - { - if let skew = skew, let skewAxis = skewAxis { - return CATransform3DMakeTranslation(position.x, position.y, 0) - .rotated(rotationX, axis: .x) - .rotated(rotationY, axis: .y) - .rotated(rotationZ, axis: .z) - .skewed(skew: -skew, skewAxis: skewAxis) - .scaled(scale * 0.01) - .translated(anchor * -1) - } - return CATransform3DMakeTranslation(position.x, position.y, 0) - .rotated(rotationX, axis: .x) - .rotated(rotationY, axis: .y) - .rotated(rotationZ, axis: .z) - .scaled(scale * 0.01) - .translated(anchor * -1) - } - - func rotated(_ degrees: CGFloat, axis: Axis) -> CATransform3D { - CATransform3DRotate( - self, - degrees.toRadians(), - axis == .x ? 1 : 0, - axis == .y ? 1 : 0, - axis == .z ? 1 : 0) - } - - func translated(_ translation: CGPoint) -> CATransform3D { - CATransform3DTranslate(self, translation.x, translation.y, 0) - } - - func scaled(_ scale: CGSize) -> CATransform3D { - CATransform3DScale(self, scale.width, scale.height, 1) - } - - func skewed(skew: CGFloat, skewAxis: CGFloat) -> CATransform3D { - CATransform3DConcat(CATransform3D.makeSkew(skew: skew, skewAxis: skewAxis), self) - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Public/Animation/LottieAnimation.swift b/Example/Pods/lottie-ios/Sources/Public/Animation/LottieAnimation.swift deleted file mode 100644 index 98cdef1..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/Animation/LottieAnimation.swift +++ /dev/null @@ -1,160 +0,0 @@ -// -// LottieAnimation.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/7/19. -// - -import Foundation - -// MARK: - CoordinateSpace - -public enum CoordinateSpace: Int, Codable { - case type2d - case type3d -} - -// MARK: - LottieAnimation - -/// The `LottieAnimation` model is the top level model object in Lottie. -/// -/// A `LottieAnimation` holds all of the animation data backing a Lottie Animation. -/// Codable, see JSON schema [here](https://github.com/airbnb/lottie-web/tree/master/docs/json). -public final class LottieAnimation: Codable, DictionaryInitializable { - - // MARK: Lifecycle - - required public init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: LottieAnimation.CodingKeys.self) - version = try container.decode(String.self, forKey: .version) - type = try container.decodeIfPresent(CoordinateSpace.self, forKey: .type) ?? .type2d - startFrame = try container.decode(AnimationFrameTime.self, forKey: .startFrame) - endFrame = try container.decode(AnimationFrameTime.self, forKey: .endFrame) - framerate = try container.decode(Double.self, forKey: .framerate) - width = try container.decode(Double.self, forKey: .width) - height = try container.decode(Double.self, forKey: .height) - layers = try container.decode([LayerModel].self, ofFamily: LayerType.self, forKey: .layers) - glyphs = try container.decodeIfPresent([Glyph].self, forKey: .glyphs) - fonts = try container.decodeIfPresent(FontList.self, forKey: .fonts) - assetLibrary = try container.decodeIfPresent(AssetLibrary.self, forKey: .assetLibrary) - markers = try container.decodeIfPresent([Marker].self, forKey: .markers) - - if let markers = markers { - var markerMap: [String: Marker] = [:] - for marker in markers { - markerMap[marker.name] = marker - } - self.markerMap = markerMap - } else { - markerMap = nil - } - } - - public init(dictionary: [String: Any]) throws { - version = try dictionary.value(for: CodingKeys.version) - if - let typeRawValue = dictionary[CodingKeys.type.rawValue] as? Int, - let type = CoordinateSpace(rawValue: typeRawValue) - { - self.type = type - } else { - type = .type2d - } - startFrame = try dictionary.value(for: CodingKeys.startFrame) - endFrame = try dictionary.value(for: CodingKeys.endFrame) - framerate = try dictionary.value(for: CodingKeys.framerate) - width = try dictionary.value(for: CodingKeys.width) - height = try dictionary.value(for: CodingKeys.height) - let layerDictionaries: [[String: Any]] = try dictionary.value(for: CodingKeys.layers) - layers = try [LayerModel].fromDictionaries(layerDictionaries) - if let glyphDictionaries = dictionary[CodingKeys.glyphs.rawValue] as? [[String: Any]] { - glyphs = try glyphDictionaries.map { try Glyph(dictionary: $0) } - } else { - glyphs = nil - } - if let fontsDictionary = dictionary[CodingKeys.fonts.rawValue] as? [String: Any] { - fonts = try FontList(dictionary: fontsDictionary) - } else { - fonts = nil - } - if let assetLibraryDictionaries = dictionary[CodingKeys.assetLibrary.rawValue] as? [[String: Any]] { - assetLibrary = try AssetLibrary(value: assetLibraryDictionaries) - } else { - assetLibrary = nil - } - if let markerDictionaries = dictionary[CodingKeys.markers.rawValue] as? [[String: Any]] { - let markers = try markerDictionaries.map { try Marker(dictionary: $0) } - var markerMap: [String: Marker] = [:] - for marker in markers { - markerMap[marker.name] = marker - } - self.markers = markers - self.markerMap = markerMap - } else { - markers = nil - markerMap = nil - } - } - - // MARK: Public - - /// The start time of the composition in frameTime. - public let startFrame: AnimationFrameTime - - /// The end time of the composition in frameTime. - public let endFrame: AnimationFrameTime - - /// The frame rate of the composition. - public let framerate: Double - - /// Return all marker names, in order, or an empty list if none are specified - public var markerNames: [String] { - guard let markers = markers else { return [] } - return markers.map { $0.name } - } - - // MARK: Internal - - enum CodingKeys: String, CodingKey { - case version = "v" - case type = "ddd" - case startFrame = "ip" - case endFrame = "op" - case framerate = "fr" - case width = "w" - case height = "h" - case layers - case glyphs = "chars" - case fonts - case assetLibrary = "assets" - case markers - } - - /// The version of the JSON Schema. - let version: String - - /// The coordinate space of the composition. - let type: CoordinateSpace - - /// The height of the composition in points. - let width: Double - - /// The width of the composition in points. - let height: Double - - /// The list of animation layers - let layers: [LayerModel] - - /// The list of glyphs used for text rendering - let glyphs: [Glyph]? - - /// The list of fonts used for text rendering - let fonts: FontList? - - /// Asset Library - let assetLibrary: AssetLibrary? - - /// Markers - let markers: [Marker]? - let markerMap: [String: Marker]? -} diff --git a/Example/Pods/lottie-ios/Sources/Public/Animation/LottieAnimationHelpers.swift b/Example/Pods/lottie-ios/Sources/Public/Animation/LottieAnimationHelpers.swift deleted file mode 100644 index 16bd72b..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/Animation/LottieAnimationHelpers.swift +++ /dev/null @@ -1,319 +0,0 @@ -// -// AnimationPublic.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/5/19. -// - -import CoreGraphics -import Foundation - -extension LottieAnimation { - - /// A closure for an Animation download. The closure is passed `nil` if there was an error. - public typealias DownloadClosure = (LottieAnimation?) -> Void - - /// The duration in seconds of the animation. - public var duration: TimeInterval { - Double(endFrame - startFrame) / framerate - } - - /// The natural bounds in points of the animation. - public var bounds: CGRect { - CGRect(x: 0, y: 0, width: width, height: height) - } - - /// The natural size in points of the animation. - public var size: CGSize { - CGSize(width: width, height: height) - } - - // MARK: Animation (Loading) - - /// Loads an animation model from a bundle by its name. Returns `nil` if an animation is not found. - /// - /// - Parameter name: The name of the json file without the json extension. EG "StarAnimation" - /// - Parameter bundle: The bundle in which the animation is located. Defaults to `Bundle.main` - /// - Parameter subdirectory: A subdirectory in the bundle in which the animation is located. Optional. - /// - Parameter animationCache: A cache for holding loaded animations. Defaults to `LottieAnimationCache.shared`. Optional. - /// - /// - Returns: Deserialized `LottieAnimation`. Optional. - public static func named( - _ name: String, - bundle: Bundle = Bundle.main, - subdirectory: String? = nil, - animationCache: AnimationCacheProvider? = LottieAnimationCache.shared) - -> LottieAnimation? - { - /// Create a cache key for the animation. - let cacheKey = bundle.bundlePath + (subdirectory ?? "") + "/" + name - - /// Check cache for animation - if - let animationCache = animationCache, - let animation = animationCache.animation(forKey: cacheKey) - { - /// If found, return the animation. - return animation - } - - do { - /// Decode animation. - let json = try bundle.getAnimationData(name, subdirectory: subdirectory) - let animation = try LottieAnimation.from(data: json) - animationCache?.setAnimation(animation, forKey: cacheKey) - return animation - } catch { - /// Decoding error. - LottieLogger.shared.warn("Error when decoding animation \"\(name)\": \(error)") - return nil - } - } - - /// Loads an animation from a specific filepath. - /// - Parameter filepath: The absolute filepath of the animation to load. EG "/User/Me/starAnimation.json" - /// - Parameter animationCache: A cache for holding loaded animations. Defaults to `LottieAnimationCache.shared`. Optional. - /// - /// - Returns: Deserialized `LottieAnimation`. Optional. - public static func filepath( - _ filepath: String, - animationCache: AnimationCacheProvider? = LottieAnimationCache.shared) - -> LottieAnimation? - { - /// Check cache for animation - if - let animationCache = animationCache, - let animation = animationCache.animation(forKey: filepath) - { - return animation - } - - do { - /// Decode the animation. - let json = try Data(contentsOf: URL(fileURLWithPath: filepath)) - let animation = try LottieAnimation.from(data: json) - animationCache?.setAnimation(animation, forKey: filepath) - return animation - } catch { - LottieLogger.shared.warn(""" - Failed to load animation from filepath \(filepath) - with underlying error: \(error.localizedDescription) - """) - return nil - } - } - - /// Loads an animation model from the asset catalog by its name. Returns `nil` if an animation is not found. - /// - Parameter name: The name of the json file in the asset catalog. EG "StarAnimation" - /// - Parameter bundle: The bundle in which the animation is located. Defaults to `Bundle.main` - /// - Parameter animationCache: A cache for holding loaded animations. Defaults to `LottieAnimationCache.shared` Optional. - /// - Returns: Deserialized `LottieAnimation`. Optional. - public static func asset( - _ name: String, - bundle: Bundle = Bundle.main, - animationCache: AnimationCacheProvider? = LottieAnimationCache.shared) - -> LottieAnimation? - { - /// Create a cache key for the animation. - let cacheKey = bundle.bundlePath + "/" + name - - /// Check cache for animation - if - let animationCache = animationCache, - let animation = animationCache.animation(forKey: cacheKey) - { - /// If found, return the animation. - return animation - } - - do { - /// Load jsonData from Asset - let json = try Data(assetName: name, in: bundle) - /// Decode animation. - let animation = try LottieAnimation.from(data: json) - animationCache?.setAnimation(animation, forKey: cacheKey) - return animation - } catch { - LottieLogger.shared.warn(""" - Failed to load animation with asset name \(name) - in \(bundle.bundlePath) - with underlying error: \(error.localizedDescription) - """) - return nil - } - } - - /// Loads a Lottie animation from a `Data` object containing a JSON animation. - /// - /// - Parameter data: The object to load the animation from. - /// - Parameter strategy: How the data should be decoded. Defaults to using the strategy set in `LottieConfiguration.shared`. - /// - Returns: Deserialized `LottieAnimation`. Optional. - /// - public static func from( - data: Data, - strategy: DecodingStrategy = LottieConfiguration.shared.decodingStrategy) - throws -> LottieAnimation - { - switch strategy { - case .legacyCodable: - return try JSONDecoder().decode(LottieAnimation.self, from: data) - case .dictionaryBased: - let json = try JSONSerialization.jsonObject(with: data) - guard let dict = json as? [String: Any] else { - throw InitializableError.invalidInput - } - return try LottieAnimation(dictionary: dict) - } - } - - /// Loads a Lottie animation asynchronously from the URL. - /// - /// - Parameter url: The url to load the animation from. - /// - Parameter animationCache: A cache for holding loaded animations. Defaults to `LottieAnimationCache.shared`. Optional. - /// - @available(iOS 13.0, macOS 10.15, tvOS 13.0, *) - public static func loadedFrom( - url: URL, - session: URLSession = .shared, - animationCache: AnimationCacheProvider? = LottieAnimationCache.shared) - async -> LottieAnimation? - { - await withCheckedContinuation { continuation in - LottieAnimation.loadedFrom( - url: url, - session: session, - closure: { result in - continuation.resume(returning: result) - }, - animationCache: animationCache) - } - } - - /// Loads a Lottie animation asynchronously from the URL. - /// - /// - Parameter url: The url to load the animation from. - /// - Parameter closure: A closure to be called when the animation has loaded. - /// - Parameter animationCache: A cache for holding loaded animations. Defaults to `LottieAnimationCache.shared`. Optional. - /// - public static func loadedFrom( - url: URL, - session: URLSession = .shared, - closure: @escaping LottieAnimation.DownloadClosure, - animationCache: AnimationCacheProvider? = LottieAnimationCache.shared) - { - if let animationCache = animationCache, let animation = animationCache.animation(forKey: url.absoluteString) { - closure(animation) - } else { - let task = session.dataTask(with: url) { data, _, error in - guard error == nil, let jsonData = data else { - DispatchQueue.main.async { - closure(nil) - } - return - } - do { - let animation = try LottieAnimation.from(data: jsonData) - DispatchQueue.main.async { - animationCache?.setAnimation(animation, forKey: url.absoluteString) - closure(animation) - } - } catch { - DispatchQueue.main.async { - closure(nil) - } - } - } - task.resume() - } - } - - // MARK: Animation (Helpers) - - /// Markers are a way to describe a point in time by a key name. - /// - /// Markers are encoded into animation JSON. By using markers a designer can mark - /// playback points for a developer to use without having to worry about keeping - /// track of animation frames. If the animation file is updated, the developer - /// does not need to update playback code. - /// - /// Returns the Progress Time for the marker named. Returns nil if no marker found. - public func progressTime(forMarker named: String) -> AnimationProgressTime? { - guard let markers = markerMap, let marker = markers[named] else { - return nil - } - return progressTime(forFrame: marker.frameTime) - } - - /// Markers are a way to describe a point in time by a key name. - /// - /// Markers are encoded into animation JSON. By using markers a designer can mark - /// playback points for a developer to use without having to worry about keeping - /// track of animation frames. If the animation file is updated, the developer - /// does not need to update playback code. - /// - /// Returns the Frame Time for the marker named. Returns nil if no marker found. - public func frameTime(forMarker named: String) -> AnimationFrameTime? { - guard let markers = markerMap, let marker = markers[named] else { - return nil - } - return marker.frameTime - } - - /// Markers are a way to describe a point in time and a duration by a key name. - /// - /// Markers are encoded into animation JSON. By using markers a designer can mark - /// playback points for a developer to use without having to worry about keeping - /// track of animation frames. If the animation file is updated, the developer - /// does not need to update playback code. - /// - /// - Returns: The duration frame time for the marker, or `nil` if no marker found. - public func durationFrameTime(forMarker named: String) -> AnimationFrameTime? { - guard let marker = markerMap?[named] else { - return nil - } - return marker.durationFrameTime - } - - /// Converts Frame Time (Seconds * Framerate) into Progress Time - /// (optionally clamped to between 0 and 1). - public func progressTime( - forFrame frameTime: AnimationFrameTime, - clamped: Bool = true) - -> AnimationProgressTime - { - let progressTime = ((frameTime - startFrame) / (endFrame - startFrame)) - - if clamped { - return progressTime.clamp(0, 1) - } else { - return progressTime - } - } - - /// Converts Progress Time (0 to 1) into Frame Time (Seconds * Framerate) - public func frameTime(forProgress progressTime: AnimationProgressTime) -> AnimationFrameTime { - ((endFrame - startFrame) * progressTime) + startFrame - } - - /// Converts Frame Time (Seconds * Framerate) into Time (Seconds) - public func time(forFrame frameTime: AnimationFrameTime) -> TimeInterval { - Double(frameTime - startFrame) / framerate - } - - /// Converts Time (Seconds) into Frame Time (Seconds * Framerate) - public func frameTime(forTime time: TimeInterval) -> AnimationFrameTime { - CGFloat(time * framerate) + startFrame - } -} - -// MARK: - Foundation.Bundle + Sendable - -/// Necessary to suppress warnings like: -/// ``` -/// Non-sendable type 'Bundle' exiting main actor-isolated context in call to non-isolated -/// static method 'named(_:bundle:subdirectory:dotLottieCache:)' cannot cross actor boundary -/// ``` -/// This retroactive conformance is safe because Sendable is a marker protocol that doesn't -/// include any runtime component. Multiple modules in the same package graph can provide this -/// conformance without causing any conflicts. -extension Foundation.Bundle: @unchecked Sendable { } diff --git a/Example/Pods/lottie-ios/Sources/Public/Animation/LottieAnimationView.swift b/Example/Pods/lottie-ios/Sources/Public/Animation/LottieAnimationView.swift deleted file mode 100644 index 9e8d292..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/Animation/LottieAnimationView.swift +++ /dev/null @@ -1,1513 +0,0 @@ -// -// LottieAnimationView.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/23/19. -// - -import Foundation -import QuartzCore - -// MARK: - LottieBackgroundBehavior - -/// Describes the behavior of an AnimationView when the app is moved to the background. -public enum LottieBackgroundBehavior { - /// Stop the animation and reset it to the beginning of its current play time. The completion block is called. - case stop - - /// Pause the animation in its current state. The completion block is called. - case pause - - /// Pause the animation and restart it when the application moves to the foreground. - /// The completion block is stored and called when the animation completes. - /// - This is the default when using the Main Thread rendering engine. - case pauseAndRestore - - /// Stops the animation and sets it to the end of its current play time. The completion block is called. - case forceFinish - - /// The animation continues playing in the background. - /// - This is the default when using the Core Animation rendering engine. - /// Playing an animation using the Core Animation engine doesn't come with any CPU overhead, - /// so using `.continuePlaying` avoids the need to stop and then resume the animation - /// (which does come with some CPU overhead). - /// - This mode should not be used with the Main Thread rendering engine. - case continuePlaying - - // MARK: Public - - /// The default background behavior, based on the rendering engine being used to play the animation. - /// - Playing an animation using the Main Thread rendering engine comes with CPU overhead, - /// so the animation should be paused or stopped when the `LottieAnimationView` is not visible. - /// - Playing an animation using the Core Animation rendering engine does not come with any - /// CPU overhead, so these animations do not need to be paused in the background. - public static func `default`(for renderingEngine: RenderingEngine) -> LottieBackgroundBehavior { - switch renderingEngine { - case .mainThread: - return .pauseAndRestore - case .coreAnimation: - return .continuePlaying - } - } -} - -// MARK: - LottieLoopMode - -/// Defines animation loop behavior -public enum LottieLoopMode { - /// Animation is played once then stops. - case playOnce - /// Animation will loop from beginning to end until stopped. - case loop - /// Animation will play forward, then backwards and loop until stopped. - case autoReverse - /// Animation will loop from beginning to end up to defined amount of times. - case `repeat`(Float) - /// Animation will play forward, then backwards a defined amount of times. - case repeatBackwards(Float) -} - -// MARK: Equatable - -extension LottieLoopMode: Equatable { - public static func == (lhs: LottieLoopMode, rhs: LottieLoopMode) -> Bool { - switch (lhs, rhs) { - case (.repeat(let lhsAmount), .repeat(let rhsAmount)), - (.repeatBackwards(let lhsAmount), .repeatBackwards(let rhsAmount)): - return lhsAmount == rhsAmount - case (.playOnce, .playOnce), - (.loop, .loop), - (.autoReverse, .autoReverse): - return true - default: - return false - } - } -} - -// MARK: - LottieAnimationView - -@IBDesignable -open class LottieAnimationView: LottieAnimationViewBase { - - // MARK: Lifecycle - - // MARK: - Public (Initializers) - - /// Initializes an AnimationView with an animation. - public init( - animation: LottieAnimation?, - imageProvider: AnimationImageProvider? = nil, - textProvider: AnimationTextProvider = DefaultTextProvider(), - fontProvider: AnimationFontProvider = DefaultFontProvider(), - configuration: LottieConfiguration = .shared, - logger: LottieLogger = .shared) - { - self.animation = animation - self.imageProvider = imageProvider ?? BundleImageProvider(bundle: Bundle.main, searchPath: nil) - self.textProvider = textProvider - self.fontProvider = fontProvider - self.configuration = configuration - self.logger = logger - super.init(frame: .zero) - commonInit() - makeAnimationLayer(usingEngine: configuration.renderingEngine) - if let animation = animation { - frame = animation.bounds - } - } - - /// Initializes an AnimationView with a .lottie file. - public init( - dotLottie: DotLottieFile?, - animationId: String? = nil, - textProvider: AnimationTextProvider = DefaultTextProvider(), - fontProvider: AnimationFontProvider = DefaultFontProvider(), - configuration: LottieConfiguration = .shared, - logger: LottieLogger = .shared) - { - let dotLottieAnimation = dotLottie?.animation(for: animationId) - animation = dotLottieAnimation?.animation - imageProvider = dotLottie?.imageProvider ?? BundleImageProvider(bundle: Bundle.main, searchPath: nil) - self.textProvider = textProvider - self.fontProvider = fontProvider - self.configuration = configuration - self.logger = logger - super.init(frame: .zero) - commonInit() - loopMode = dotLottieAnimation?.configuration.loopMode ?? .playOnce - animationSpeed = CGFloat(dotLottieAnimation?.configuration.speed ?? 1) - makeAnimationLayer(usingEngine: configuration.renderingEngine) - if let animation = animation { - frame = animation.bounds - } - } - - public init( - configuration: LottieConfiguration = .shared, - logger: LottieLogger = .shared) - { - animation = nil - imageProvider = BundleImageProvider(bundle: Bundle.main, searchPath: nil) - textProvider = DefaultTextProvider() - fontProvider = DefaultFontProvider() - self.configuration = configuration - self.logger = logger - super.init(frame: .zero) - commonInit() - } - - public override init(frame: CGRect) { - animation = nil - imageProvider = BundleImageProvider(bundle: Bundle.main, searchPath: nil) - textProvider = DefaultTextProvider() - fontProvider = DefaultFontProvider() - configuration = .shared - logger = .shared - super.init(frame: frame) - commonInit() - } - - required public init?(coder aDecoder: NSCoder) { - imageProvider = BundleImageProvider(bundle: Bundle.main, searchPath: nil) - textProvider = DefaultTextProvider() - fontProvider = DefaultFontProvider() - configuration = .shared - logger = .shared - super.init(coder: aDecoder) - commonInit() - } - - // MARK: Open - - /// Plays the animation from its current state to the end. - /// - /// - Parameter completion: An optional completion closure to be called when the animation completes playing. - open func play(completion: LottieCompletionBlock? = nil) { - guard let animation = animation else { - return - } - - /// Build a context for the animation. - let context = AnimationContext( - playFrom: CGFloat(animation.startFrame), - playTo: CGFloat(animation.endFrame), - closure: completion) - removeCurrentAnimationIfNecessary() - addNewAnimationForContext(context) - } - - /// Plays the animation from a progress (0-1) to a progress (0-1). - /// - /// - Parameter fromProgress: The start progress of the animation. If `nil` the animation will start at the current progress. - /// - Parameter toProgress: The end progress of the animation. - /// - Parameter loopMode: The loop behavior of the animation. If `nil` the view's `loopMode` property will be used. - /// - Parameter completion: An optional completion closure to be called when the animation stops. - open func play( - fromProgress: AnimationProgressTime? = nil, - toProgress: AnimationProgressTime, - loopMode: LottieLoopMode? = nil, - completion: LottieCompletionBlock? = nil) - { - guard let animation = animation else { - return - } - - removeCurrentAnimationIfNecessary() - if let loopMode = loopMode { - /// Set the loop mode, if one was supplied - self.loopMode = loopMode - } - let context = AnimationContext( - playFrom: animation.frameTime(forProgress: fromProgress ?? currentProgress), - playTo: animation.frameTime(forProgress: toProgress), - closure: completion) - addNewAnimationForContext(context) - } - - /// Plays the animation from a start frame to an end frame in the animation's framerate. - /// - /// - Parameter fromFrame: The start frame of the animation. If `nil` the animation will start at the current frame. - /// - Parameter toFrame: The end frame of the animation. - /// - Parameter loopMode: The loop behavior of the animation. If `nil` the view's `loopMode` property will be used. - /// - Parameter completion: An optional completion closure to be called when the animation stops. - open func play( - fromFrame: AnimationFrameTime? = nil, - toFrame: AnimationFrameTime, - loopMode: LottieLoopMode? = nil, - completion: LottieCompletionBlock? = nil) - { - removeCurrentAnimationIfNecessary() - if let loopMode = loopMode { - /// Set the loop mode, if one was supplied - self.loopMode = loopMode - } - - let context = AnimationContext( - playFrom: fromFrame ?? currentFrame, - playTo: toFrame, - closure: completion) - addNewAnimationForContext(context) - } - - /// Plays the animation from a named marker to another marker. - /// - /// Markers are point in time that are encoded into the Animation data and assigned - /// a name. - /// - /// NOTE: If markers are not found the play command will exit. - /// - /// - Parameter fromMarker: The start marker for the animation playback. If `nil` the - /// animation will start at the current progress. - /// - Parameter toMarker: The end marker for the animation playback. - /// - Parameter playEndMarkerFrame: A flag to determine whether or not to play the frame of the end marker. If the - /// end marker represents the end of the section to play, it should be to true. If the provided end marker - /// represents the beginning of the next section, it should be false. - /// - Parameter loopMode: The loop behavior of the animation. If `nil` the view's `loopMode` property will be used. - /// - Parameter completion: An optional completion closure to be called when the animation stops. - open func play( - fromMarker: String? = nil, - toMarker: String, - playEndMarkerFrame: Bool = true, - loopMode: LottieLoopMode? = nil, - completion: LottieCompletionBlock? = nil) - { - guard let animation = animation, let markers = animation.markerMap, let to = markers[toMarker] else { - return - } - - removeCurrentAnimationIfNecessary() - if let loopMode = loopMode { - /// Set the loop mode, if one was supplied - self.loopMode = loopMode - } - - let fromTime: CGFloat - if let fromName = fromMarker, let from = markers[fromName] { - fromTime = CGFloat(from.frameTime) - } else { - fromTime = currentFrame - } - - let playTo = playEndMarkerFrame ? CGFloat(to.frameTime) : CGFloat(to.frameTime) - 1 - let context = AnimationContext( - playFrom: fromTime, - playTo: playTo, - closure: completion) - addNewAnimationForContext(context) - } - - /// Plays the animation from a named marker to the end of the marker's duration. - /// - /// A marker is a point in time with an associated duration that is encoded into the - /// animation data and assigned a name. - /// - /// NOTE: If marker is not found the play command will exit. - /// - /// - Parameter marker: The start marker for the animation playback. - /// - Parameter loopMode: The loop behavior of the animation. If `nil` the view's `loopMode` property will be used. - /// - Parameter completion: An optional completion closure to be called when the animation stops. - open func play( - marker: String, - loopMode: LottieLoopMode? = nil, - completion: LottieCompletionBlock? = nil) - { - guard let from = animation?.markerMap?[marker] else { - return - } - - play( - fromFrame: from.frameTime, - toFrame: from.frameTime + from.durationFrameTime, - loopMode: loopMode, - completion: completion) - } - - /// Stops the animation and resets the view to its start frame. - /// - /// The completion closure will be called with `false` - open func stop() { - removeCurrentAnimation() - currentFrame = 0 - } - - /// Pauses the animation in its current state. - /// - /// The completion closure will be called with `false` - open func pause() { - removeCurrentAnimation() - } - - // MARK: Public - - /// The configuration that this `LottieAnimationView` uses when playing its animation - public let configuration: LottieConfiguration - - /// Value Providers that have been registered using `setValueProvider(_:keypath:)` - public private(set) var valueProviders = [AnimationKeypath: AnyValueProvider]() - - /// Describes the behavior of an AnimationView when the app is moved to the background. - /// - /// The default for the Main Thread animation engine is `pause`, - /// which pauses the animation when the application moves to - /// the background. This prevents the animation from consuming CPU - /// resources when not on-screen. The completion block is called with - /// `false` for completed. - /// - /// The default for the Core Animation engine is `continuePlaying`, - /// since the Core Animation engine does not have any CPU overhead. - public var backgroundBehavior: LottieBackgroundBehavior { - get { - let currentBackgroundBehavior = _backgroundBehavior ?? .default(for: currentRenderingEngine ?? .mainThread) - - if - currentRenderingEngine == .mainThread, - _backgroundBehavior == .continuePlaying - { - logger.assertionFailure(""" - `LottieBackgroundBehavior.continuePlaying` should not be used with the Main Thread - rendering engine, since this would waste CPU resources on playing an animation - that is not visible. Consider using a different background mode, or switching to - the Core Animation rendering engine (which does not have any CPU overhead). - """) - } - - return currentBackgroundBehavior - } - set { - _backgroundBehavior = newValue - } - } - - /// Sets the animation backing the animation view. Setting this will clear the - /// view's contents, completion blocks and current state. The new animation will - /// be loaded up and set to the beginning of its timeline. - public var animation: LottieAnimation? { - didSet { - makeAnimationLayer(usingEngine: configuration.renderingEngine) - - if let animation = animation { - animationLoaded?(self, animation) - } - } - } - - /// A closure that is called when `self.animation` is loaded. When setting this closure, - /// it is called immediately if `self.animation` is non-nil. - /// - /// When initializing a `LottieAnimationView`, the animation will either be loaded - /// synchronously (when loading a `LottieAnimation` from a .json file on disk) - /// or asynchronously (when loading a `DotLottieFile` from disk, or downloading - /// an animation from a URL). This closure is called in both cases once the - /// animation is loaded and applied, so can be a useful way to configure this - /// `LottieAnimationView` regardless of which initializer was used. For example: - /// - /// ``` - /// let animationView: LottieAnimationView - /// - /// if loadDotLottieFile { - /// // Loads the .lottie file asynchronously - /// animationView = LottieAnimationView(dotLottieName: "animation") - /// } else { - /// // Loads the .json file synchronously - /// animationView = LottieAnimationView(name: "animation") - /// } - /// - /// animationView.animationLoaded = { animationView, animation in - /// // If using a .lottie file, this is called once the file finishes loading. - /// // If using a .json file, this is called immediately (since the animation is loaded synchronously). - /// animationView.play() - /// } - /// ``` - public var animationLoaded: ((_ animationView: LottieAnimationView, _ animation: LottieAnimation) -> Void)? { - didSet { - if let animation = animation { - animationLoaded?(self, animation) - } - } - } - - /// Sets the image provider for the animation view. An image provider provides the - /// animation with its required image data. - /// - /// Setting this will cause the animation to reload its image contents. - public var imageProvider: AnimationImageProvider { - didSet { - animationLayer?.imageProvider = imageProvider.cachedImageProvider - reloadImages() - } - } - - /// Sets the text provider for animation view. A text provider provides the - /// animation with values for text layers - public var textProvider: AnimationTextProvider { - didSet { - animationLayer?.textProvider = textProvider - } - } - - /// Sets the text provider for animation view. A text provider provides the - /// animation with values for text layers - public var fontProvider: AnimationFontProvider { - didSet { - animationLayer?.fontProvider = fontProvider - } - } - - /// Whether or not the animation is masked to the bounds. Defaults to true. - public var maskAnimationToBounds = true { - didSet { - animationLayer?.masksToBounds = maskAnimationToBounds - } - } - - /// Returns `true` if the animation is currently playing. - public var isAnimationPlaying: Bool { - guard let animationLayer = animationLayer else { - return false - } - - if let valueFromLayer = animationLayer.isAnimationPlaying { - return valueFromLayer - } else { - return animationLayer.animation(forKey: activeAnimationName) != nil - } - } - - /// Returns `true` if the animation will start playing when this view is added to a window. - public var isAnimationQueued: Bool { - animationContext != nil && waitingToPlayAnimation - } - - /// Sets the loop behavior for `play` calls. Defaults to `playOnce` - public var loopMode: LottieLoopMode = .playOnce { - didSet { - updateInFlightAnimation() - } - } - - /// When `true` the animation view will rasterize its contents when not animating. - /// Rasterizing will improve performance of static animations. - /// - /// Note: this will not produce crisp results at resolutions above the animations natural resolution. - /// - /// Defaults to `false` - public var shouldRasterizeWhenIdle = false { - didSet { - updateRasterizationState() - } - } - - /// Sets the current animation time with a Progress Time - /// - /// Note: Setting this will stop the current animation, if any. - /// Note 2: If `animation` is nil, setting this will fallback to 0 - public var currentProgress: AnimationProgressTime { - set { - if let animation = animation { - currentFrame = animation.frameTime(forProgress: newValue) - } else { - currentFrame = 0 - } - } - get { - if let animation = animation { - return animation.progressTime(forFrame: currentFrame) - } else { - return 0 - } - } - } - - /// Sets the current animation time with a time in seconds. - /// - /// Note: Setting this will stop the current animation, if any. - /// Note 2: If `animation` is nil, setting this will fallback to 0 - public var currentTime: TimeInterval { - set { - if let animation = animation { - currentFrame = animation.frameTime(forTime: newValue) - } else { - currentFrame = 0 - } - } - get { - if let animation = animation { - return animation.time(forFrame: currentFrame) - } else { - return 0 - } - } - } - - /// Sets the current animation time with a frame in the animations framerate. - /// - /// Note: Setting this will stop the current animation, if any. - public var currentFrame: AnimationFrameTime { - set { - removeCurrentAnimationIfNecessary() - updateAnimationFrame(newValue) - } - get { - animationLayer?.currentFrame ?? 0 - } - } - - /// Returns the current animation frame while an animation is playing. - public var realtimeAnimationFrame: AnimationFrameTime { - isAnimationPlaying ? animationLayer?.presentation()?.currentFrame ?? currentFrame : currentFrame - } - - /// Returns the current animation frame while an animation is playing. - public var realtimeAnimationProgress: AnimationProgressTime { - if let animation = animation { - return animation.progressTime(forFrame: realtimeAnimationFrame) - } - return 0 - } - - /// Sets the speed of the animation playback. Defaults to 1 - public var animationSpeed: CGFloat = 1 { - didSet { - updateInFlightAnimation() - } - } - - /// When `true` the animation will play back at the framerate encoded in the - /// `LottieAnimation` model. When `false` the animation will play at the framerate - /// of the device. - /// - /// Defaults to false - public var respectAnimationFrameRate = false { - didSet { - animationLayer?.respectAnimationFrameRate = respectAnimationFrameRate - } - } - - /// Controls the cropping of an Animation. Setting this property will crop the animation - /// to the current views bounds by the viewport frame. The coordinate space is specified - /// in the animation's coordinate space. - /// - /// Animatable. - public var viewportFrame: CGRect? = nil { - didSet { - // This is really ugly, but is needed to trigger a layout pass within an animation block. - // Typically this happens automatically, when layout objects are UIView based. - // The animation layer is a CALayer which will not implicitly grab the animation - // duration of a UIView animation block. - // - // By setting bounds and then resetting bounds the UIView animation block's - // duration and curve are captured and added to the layer. This is used in the - // layout block to animate the animationLayer's position and size. - let rect = bounds - self.bounds = CGRect.zero - self.bounds = rect - self.setNeedsLayout() - } - } - - override public var intrinsicContentSize: CGSize { - if let animation = animation { - return animation.bounds.size - } - return .zero - } - - /// The rendering engine currently being used by this view. - /// - This will only be `nil` in cases where the configuration is `automatic` - /// but a `RootAnimationLayer` hasn't been constructed yet - public var currentRenderingEngine: RenderingEngine? { - switch configuration.renderingEngine { - case .specific(let engine): - return engine - - case .automatic: - guard let animationLayer = animationLayer else { - return nil - } - - if animationLayer is CoreAnimationLayer { - return .coreAnimation - } else { - return .mainThread - } - } - } - - /// Sets the lottie file backing the animation view. Setting this will clear the - /// view's contents, completion blocks and current state. The new animation will - /// be loaded up and set to the beginning of its timeline. - /// The loopMode, animationSpeed and imageProvider will be set according - /// to lottie file settings - /// - Parameters: - /// - animationId: Internal animation id to play. Optional - /// Defaults to play first animation in file. - /// - dotLottieFile: Lottie file to play - public func loadAnimation( - _ animationId: String? = nil, - from dotLottieFile: DotLottieFile) - { - guard let dotLottieAnimation = dotLottieFile.animation(for: animationId) else { return } - - loopMode = dotLottieAnimation.configuration.loopMode - animationSpeed = CGFloat(dotLottieAnimation.configuration.speed) - - if let imageProvider = dotLottieAnimation.configuration.imageProvider { - self.imageProvider = imageProvider - } - - animation = dotLottieAnimation.animation - } - - /// Reloads the images supplied to the animation from the `imageProvider` - public func reloadImages() { - animationLayer?.reloadImages() - } - - /// Forces the LottieAnimationView to redraw its contents. - public func forceDisplayUpdate() { - animationLayer?.forceDisplayUpdate() - } - - /// Sets a ValueProvider for the specified keypath. The value provider will be set - /// on all properties that match the keypath. - /// - /// Nearly all properties of a Lottie animation can be changed at runtime using a - /// combination of `Animation Keypaths` and `Value Providers`. - /// Setting a ValueProvider on a keypath will cause the animation to update its - /// contents and read the new Value Provider. - /// - /// A value provider provides a typed value on a frame by frame basis. - /// - /// - Parameter valueProvider: The new value provider for the properties. - /// - Parameter keypath: The keypath used to search for properties. - /// - /// Example: - /// ``` - /// /// A keypath that finds the color value for all `Fill 1` nodes. - /// let fillKeypath = AnimationKeypath(keypath: "**.Fill 1.Color") - /// /// A Color Value provider that returns a reddish color. - /// let redValueProvider = ColorValueProvider(Color(r: 1, g: 0.2, b: 0.3, a: 1)) - /// /// Set the provider on the animationView. - /// animationView.setValueProvider(redValueProvider, keypath: fillKeypath) - /// ``` - public func setValueProvider(_ valueProvider: AnyValueProvider, keypath: AnimationKeypath) { - guard let animationLayer = animationLayer else { return } - - valueProviders[keypath] = valueProvider - animationLayer.setValueProvider(valueProvider, keypath: keypath) - } - - /// Reads the value of a property specified by the Keypath. - /// Returns nil if no property is found. - /// - /// - Parameter for: The keypath used to search for the property. - /// - Parameter atFrame: The Frame Time of the value to query. If nil then the current frame is used. - public func getValue(for keypath: AnimationKeypath, atFrame: AnimationFrameTime?) -> Any? { - animationLayer?.getValue(for: keypath, atFrame: atFrame) - } - - /// Reads the original value of a property specified by the Keypath. - /// This will ignore any value providers and can be useful when implementing a value providers that makes change to the original value from the animation. - /// Returns nil if no property is found. - /// - /// - Parameter for: The keypath used to search for the property. - /// - Parameter atFrame: The Frame Time of the value to query. If nil then the current frame is used. - public func getOriginalValue(for keypath: AnimationKeypath, atFrame: AnimationFrameTime?) -> Any? { - animationLayer?.getOriginalValue(for: keypath, atFrame: atFrame) - } - - /// Logs all child keypaths. - /// Logs the result of `allHierarchyKeypaths()` to the `LottieLogger`. - public func logHierarchyKeypaths() { - animationLayer?.logHierarchyKeypaths() - } - - /// Computes and returns a list of all child keypaths in the current animation. - /// The returned list is the same as the log output of `logHierarchyKeypaths()` - public func allHierarchyKeypaths() -> [String] { - animationLayer?.allHierarchyKeypaths() ?? [] - } - - /// Searches for the nearest child layer to the first Keypath and adds the subview - /// to that layer. The subview will move and animate with the child layer. - /// Furthermore the subview will be in the child layers coordinate space. - /// - /// Note: if no layer is found for the keypath, then nothing happens. - /// - /// - Parameter subview: The subview to add to the found animation layer. - /// - Parameter keypath: The keypath used to find the animation layer. - /// - /// Example: - /// ``` - /// /// A keypath that finds `Layer 1` - /// let layerKeypath = AnimationKeypath(keypath: "Layer 1") - /// - /// /// Wrap the custom view in an `AnimationSubview` - /// let subview = AnimationSubview() - /// subview.addSubview(customView) - /// - /// /// Set the provider on the animationView. - /// animationView.addSubview(subview, forLayerAt: layerKeypath) - /// ``` - public func addSubview(_ subview: AnimationSubview, forLayerAt keypath: AnimationKeypath) { - guard let sublayer = animationLayer?.layer(for: keypath) else { - return - } - setNeedsLayout() - layoutIfNeeded() - forceDisplayUpdate() - addSubview(subview) - if let subViewLayer = subview.viewLayer { - sublayer.addSublayer(subViewLayer) - } - } - - /// Converts a CGRect from the LottieAnimationView's coordinate space into the - /// coordinate space of the layer found at Keypath. - /// - /// If no layer is found, nil is returned - /// - /// - Parameter rect: The CGRect to convert. - /// - Parameter toLayerAt: The keypath used to find the layer. - public func convert(_ rect: CGRect, toLayerAt keypath: AnimationKeypath?) -> CGRect? { - guard let animationLayer = animationLayer else { return nil } - guard let keypath = keypath else { - return viewLayer?.convert(rect, to: animationLayer) - } - guard let sublayer = animationLayer.layer(for: keypath) else { - return nil - } - setNeedsLayout() - layoutIfNeeded() - forceDisplayUpdate() - return animationLayer.convert(rect, to: sublayer) - } - - /// Converts a CGPoint from the LottieAnimationView's coordinate space into the - /// coordinate space of the layer found at Keypath. - /// - /// If no layer is found, nil is returned - /// - /// - Parameter point: The CGPoint to convert. - /// - Parameter toLayerAt: The keypath used to find the layer. - public func convert(_ point: CGPoint, toLayerAt keypath: AnimationKeypath?) -> CGPoint? { - guard let animationLayer = animationLayer else { return nil } - guard let keypath = keypath else { - return viewLayer?.convert(point, to: animationLayer) - } - guard let sublayer = animationLayer.layer(for: keypath) else { - return nil - } - setNeedsLayout() - layoutIfNeeded() - forceDisplayUpdate() - return animationLayer.convert(point, to: sublayer) - } - - /// Sets the enabled state of all animator nodes found with the keypath search. - /// This can be used to interactively enable / disable parts of the animation. - /// - /// - Parameter isEnabled: When true the animator nodes affect the rendering tree. When false the node is removed from the tree. - /// - Parameter keypath: The keypath used to find the node(s). - public func setNodeIsEnabled(isEnabled: Bool, keypath: AnimationKeypath) { - guard let animationLayer = animationLayer else { return } - let nodes = animationLayer.animatorNodes(for: keypath) - if let nodes = nodes { - for node in nodes { - node.isEnabled = isEnabled - } - forceDisplayUpdate() - } - } - - /// Markers are a way to describe a point in time by a key name. - /// - /// Markers are encoded into animation JSON. By using markers a designer can mark - /// playback points for a developer to use without having to worry about keeping - /// track of animation frames. If the animation file is updated, the developer - /// does not need to update playback code. - /// - /// Returns the Progress Time for the marker named. Returns nil if no marker found. - public func progressTime(forMarker named: String) -> AnimationProgressTime? { - guard let animation = animation else { - return nil - } - return animation.progressTime(forMarker: named) - } - - /// Markers are a way to describe a point in time by a key name. - /// - /// Markers are encoded into animation JSON. By using markers a designer can mark - /// playback points for a developer to use without having to worry about keeping - /// track of animation frames. If the animation file is updated, the developer - /// does not need to update playback code. - /// - /// Returns the Frame Time for the marker named. Returns nil if no marker found. - public func frameTime(forMarker named: String) -> AnimationFrameTime? { - guard let animation = animation else { - return nil - } - return animation.frameTime(forMarker: named) - } - - /// Markers are a way to describe a point in time and a duration by a key name. - /// - /// Markers are encoded into animation JSON. By using markers a designer can mark - /// playback points for a developer to use without having to worry about keeping - /// track of animation frames. If the animation file is updated, the developer - /// does not need to update playback code. - /// - /// - Returns: The duration frame time for the marker, or `nil` if no marker found. - public func durationFrameTime(forMarker named: String) -> AnimationFrameTime? { - guard let animation = animation else { - return nil - } - return animation.durationFrameTime(forMarker: named) - } - - // MARK: Internal - - var animationLayer: RootAnimationLayer? = nil - - /// Set animation name from Interface Builder - @IBInspectable var animationName: String? { - didSet { - self.animation = animationName.flatMap { - LottieAnimation.named($0, animationCache: nil) - } - } - } - - override func layoutAnimation() { - guard let animation = animation, let animationLayer = animationLayer else { return } - var position = animation.bounds.center - let xform: CATransform3D - var shouldForceUpdates = false - - if let viewportFrame = viewportFrame { - shouldForceUpdates = contentMode == .redraw - - let compAspect = viewportFrame.size.width / viewportFrame.size.height - let viewAspect = bounds.size.width / bounds.size.height - let dominantDimension = compAspect > viewAspect ? bounds.size.width : bounds.size.height - let compDimension = compAspect > viewAspect ? viewportFrame.size.width : viewportFrame.size.height - let scale = dominantDimension / compDimension - - let viewportOffset = animation.bounds.center - viewportFrame.center - xform = CATransform3DTranslate(CATransform3DMakeScale(scale, scale, 1), viewportOffset.x, viewportOffset.y, 0) - position = bounds.center - } else { - switch contentMode { - case .scaleToFill: - position = bounds.center - xform = CATransform3DMakeScale( - bounds.size.width / animation.size.width, - bounds.size.height / animation.size.height, - 1); - case .scaleAspectFit: - position = bounds.center - let compAspect = animation.size.width / animation.size.height - let viewAspect = bounds.size.width / bounds.size.height - let dominantDimension = compAspect > viewAspect ? bounds.size.width : bounds.size.height - let compDimension = compAspect > viewAspect ? animation.size.width : animation.size.height - let scale = dominantDimension / compDimension - xform = CATransform3DMakeScale(scale, scale, 1) - case .scaleAspectFill: - position = bounds.center - let compAspect = animation.size.width / animation.size.height - let viewAspect = bounds.size.width / bounds.size.height - let scaleWidth = compAspect < viewAspect - let dominantDimension = scaleWidth ? bounds.size.width : bounds.size.height - let compDimension = scaleWidth ? animation.size.width : animation.size.height - let scale = dominantDimension / compDimension - xform = CATransform3DMakeScale(scale, scale, 1) - case .redraw: - shouldForceUpdates = true - xform = CATransform3DIdentity - case .center: - position = bounds.center - xform = CATransform3DIdentity - case .top: - position.x = bounds.center.x - xform = CATransform3DIdentity - case .bottom: - position.x = bounds.center.x - position.y = bounds.maxY - animation.bounds.midY - xform = CATransform3DIdentity - case .left: - position.y = bounds.center.y - xform = CATransform3DIdentity - case .right: - position.y = bounds.center.y - position.x = bounds.maxX - animation.bounds.midX - xform = CATransform3DIdentity - case .topLeft: - xform = CATransform3DIdentity - case .topRight: - position.x = bounds.maxX - animation.bounds.midX - xform = CATransform3DIdentity - case .bottomLeft: - position.y = bounds.maxY - animation.bounds.midY - xform = CATransform3DIdentity - case .bottomRight: - position.x = bounds.maxX - animation.bounds.midX - position.y = bounds.maxY - animation.bounds.midY - xform = CATransform3DIdentity - - #if os(iOS) || os(tvOS) - @unknown default: - logger.assertionFailure("unsupported contentMode: \(contentMode.rawValue)") - xform = CATransform3DIdentity - #endif - } - } - - // UIView Animation does not implicitly set CAAnimation time or timing fuctions. - // If layout is changed in an animation we must get the current animation duration - // and timing function and then manually create a CAAnimation to match the UIView animation. - // If layout is changed without animation, explicitly set animation duration to 0.0 - // inside CATransaction to avoid unwanted artifacts. - /// Check if any animation exist on the view's layer, and match it. - if let key = viewLayer?.animationKeys()?.first, let animation = viewLayer?.animation(forKey: key) { - // The layout is happening within an animation block. Grab the animation data. - - let positionKey = "LayoutPositionAnimation" - let transformKey = "LayoutTransformAnimation" - animationLayer.removeAnimation(forKey: positionKey) - animationLayer.removeAnimation(forKey: transformKey) - - let positionAnimation = animation.copy() as? CABasicAnimation ?? CABasicAnimation(keyPath: "position") - positionAnimation.keyPath = "position" - positionAnimation.isAdditive = false - positionAnimation.fromValue = (animationLayer.presentation() ?? animationLayer).position - positionAnimation.toValue = position - positionAnimation.isRemovedOnCompletion = true - - let xformAnimation = animation.copy() as? CABasicAnimation ?? CABasicAnimation(keyPath: "transform") - xformAnimation.keyPath = "transform" - xformAnimation.isAdditive = false - xformAnimation.fromValue = (animationLayer.presentation() ?? animationLayer).transform - xformAnimation.toValue = xform - xformAnimation.isRemovedOnCompletion = true - - animationLayer.position = position - animationLayer.transform = xform - #if os(OSX) - animationLayer.anchorPoint = layer?.anchorPoint ?? CGPoint.zero - #else - animationLayer.anchorPoint = layer.anchorPoint - #endif - animationLayer.add(positionAnimation, forKey: positionKey) - animationLayer.add(xformAnimation, forKey: transformKey) - } else { - // In performance tests, we have to wrap the animation view setup - // in a `CATransaction` in order for the layers to be deallocated at - // the correct time. The `CATransaction`s in this method interfere - // with the ones managed by the performance test, and aren't actually - // necessary in a headless environment, so we disable them. - if TestHelpers.performanceTestsAreRunning { - animationLayer.position = position - animationLayer.transform = xform - } else { - CATransaction.begin() - CATransaction.setAnimationDuration(0.0) - CATransaction.setAnimationTimingFunction(CAMediaTimingFunction(name: .linear)) - animationLayer.position = position - animationLayer.transform = xform - CATransaction.commit() - } - } - - if shouldForceUpdates { - animationLayer.forceDisplayUpdate() - } - } - - func updateRasterizationState() { - if isAnimationPlaying { - animationLayer?.shouldRasterize = false - } else { - animationLayer?.shouldRasterize = shouldRasterizeWhenIdle - } - } - - /// Updates the animation frame. Does not affect any current animations - func updateAnimationFrame(_ newFrame: CGFloat) { - // In performance tests, we have to wrap the animation view setup - // in a `CATransaction` in order for the layers to be deallocated at - // the correct time. The `CATransaction`s in this method interfere - // with the ones managed by the performance test, and aren't actually - // necessary in a headless environment, so we disable them. - if TestHelpers.performanceTestsAreRunning { - animationLayer?.currentFrame = newFrame - animationLayer?.forceDisplayUpdate() - return - } - - CATransaction.begin() - CATransaction.setCompletionBlock { - self.animationLayer?.forceDisplayUpdate() - } - CATransaction.setDisableActions(true) - animationLayer?.currentFrame = newFrame - CATransaction.commit() - } - - @objc - override func animationWillMoveToBackground() { - updateAnimationForBackgroundState() - } - - @objc - override func animationWillEnterForeground() { - updateAnimationForForegroundState() - } - - override func animationMovedToWindow() { - /// Don't update any state if the `superview` is `nil` - /// When A viewA owns superViewB, it removes the superViewB from the window. At this point, viewA still owns superViewB and triggers the viewA method: -didmovetowindow - guard superview != nil else { return } - - if window != nil { - updateAnimationForForegroundState() - } else { - updateAnimationForBackgroundState() - } - } - - /// Updates an in flight animation. - func updateInFlightAnimation() { - guard let animationContext = animationContext else { return } - - guard animationContext.closure.animationState != .complete else { - // Tried to re-add an already completed animation. Cancel. - self.animationContext = nil - return - } - - /// Tell existing context to ignore its closure - animationContext.closure.ignoreDelegate = true - - /// Make a new context, stealing the completion block from the previous. - let newContext = AnimationContext( - playFrom: animationContext.playFrom, - playTo: animationContext.playTo, - closure: animationContext.closure.completionBlock) - - /// Remove current animation, and freeze the current frame. - let pauseFrame = realtimeAnimationFrame - animationLayer?.removeAnimation(forKey: activeAnimationName) - animationLayer?.currentFrame = pauseFrame - - addNewAnimationForContext(newContext) - } - - // MARK: Fileprivate - - /// Context describing the animation that is currently playing in this `LottieAnimationView` - /// - When non-nil, an animation is currently playing in this view. Otherwise, - /// the view is paused on a specific frame. - fileprivate var animationContext: AnimationContext? - - fileprivate var _activeAnimationName: String = LottieAnimationView.animationName - fileprivate var animationID = 0 - - fileprivate var waitingToPlayAnimation = false - - fileprivate var activeAnimationName: String { - switch animationLayer?.primaryAnimationKey { - case .specific(let animationKey): - return animationKey - case .managed, nil: - return _activeAnimationName - } - } - - fileprivate func makeAnimationLayer(usingEngine renderingEngine: RenderingEngineOption) { - /// Remove current animation if any - removeCurrentAnimation() - - if let oldAnimation = animationLayer { - oldAnimation.removeFromSuperlayer() - animationLayer = nil - } - - invalidateIntrinsicContentSize() - - guard let animation = animation else { - return - } - - let rootAnimationLayer: RootAnimationLayer? - switch renderingEngine { - case .automatic: - rootAnimationLayer = makeAutomaticEngineLayer(for: animation) - case .specific(.coreAnimation): - rootAnimationLayer = makeCoreAnimationLayer(for: animation) - case .specific(.mainThread): - rootAnimationLayer = makeMainThreadAnimationLayer(for: animation) - } - - guard let animationLayer = rootAnimationLayer else { - return - } - - animationLayer.animationView = self - animationLayer.renderScale = screenScale - - viewLayer?.addSublayer(animationLayer) - self.animationLayer = animationLayer - reloadImages() - animationLayer.setNeedsDisplay() - setNeedsLayout() - currentFrame = CGFloat(animation.startFrame) - } - - fileprivate func makeMainThreadAnimationLayer(for animation: LottieAnimation) -> MainThreadAnimationLayer { - MainThreadAnimationLayer( - animation: animation, - imageProvider: imageProvider.cachedImageProvider, - textProvider: textProvider, - fontProvider: fontProvider, - maskAnimationToBounds: maskAnimationToBounds, - logger: logger) - } - - fileprivate func makeCoreAnimationLayer(for animation: LottieAnimation) -> CoreAnimationLayer? { - do { - let coreAnimationLayer = try CoreAnimationLayer( - animation: animation, - imageProvider: imageProvider.cachedImageProvider, - textProvider: textProvider, - fontProvider: fontProvider, - maskAnimationToBounds: maskAnimationToBounds, - compatibilityTrackerMode: .track, - logger: logger) - - coreAnimationLayer.didSetUpAnimation = { [logger] compatibilityIssues in - logger.assert( - compatibilityIssues.isEmpty, - "Encountered Core Animation compatibility issues while setting up animation:\n" - + compatibilityIssues.map { $0.description }.joined(separator: "\n") + "\n\n" - + """ - This animation cannot be rendered correctly by the Core Animation engine. - To resolve this issue, you can use `RenderingEngineOption.automatic`, which automatically falls back - to the Main Thread rendering engine when necessary, or just use `RenderingEngineOption.mainThread`. - - """) - } - - return coreAnimationLayer - } catch { - // This should never happen, because we initialize the `CoreAnimationLayer` with - // `CompatibilityTracker.Mode.track` (which reports errors in `didSetUpAnimation`, - // not by throwing). - logger.assertionFailure("Encountered unexpected error \(error)") - return nil - } - } - - fileprivate func makeAutomaticEngineLayer(for animation: LottieAnimation) -> CoreAnimationLayer? { - do { - // Attempt to set up the Core Animation layer. This can either throw immediately in `init`, - // or throw an error later in `CALayer.display()` that will be reported in `didSetUpAnimation`. - let coreAnimationLayer = try CoreAnimationLayer( - animation: animation, - imageProvider: imageProvider.cachedImageProvider, - textProvider: textProvider, - fontProvider: fontProvider, - maskAnimationToBounds: maskAnimationToBounds, - compatibilityTrackerMode: .abort, - logger: logger) - - coreAnimationLayer.didSetUpAnimation = { [weak self] issues in - self?.automaticEngineLayerDidSetUpAnimation(issues) - } - - return coreAnimationLayer - } catch { - if case CompatibilityTracker.Error.encounteredCompatibilityIssue(let compatibilityIssue) = error { - automaticEngineLayerDidSetUpAnimation([compatibilityIssue]) - } else { - // This should never happen, because we expect `CoreAnimationLayer` to only throw - // `CompatibilityTracker.Error.encounteredCompatibilityIssue` errors. - logger.assertionFailure("Encountered unexpected error \(error)") - automaticEngineLayerDidSetUpAnimation([]) - } - - return nil - } - } - - // Handles any compatibility issues with the Core Animation engine - // by falling back to the Main Thread engine - fileprivate func automaticEngineLayerDidSetUpAnimation(_ compatibilityIssues: [CompatibilityIssue]) { - // If there weren't any compatibility issues, then there's nothing else to do - if compatibilityIssues.isEmpty { - return - } - - logger.warn( - "Encountered Core Animation compatibility issue while setting up animation:\n" - + compatibilityIssues.map { $0.description }.joined(separator: "\n") + "\n" - + """ - This animation may have additional compatibility issues, but animation setup was cancelled early to avoid wasted work. - - Automatically falling back to Main Thread rendering engine. This fallback comes with some additional performance - overhead, which can be reduced by manually specifying that this animation should always use the Main Thread engine. - - """) - - let animationContext = animationContext - let currentFrame = currentFrame - - // Disable the completion handler delegate before tearing down the `CoreAnimationLayer` - // and building the `MainThreadAnimationLayer`. Otherwise deinitializing the - // `CoreAnimationLayer` would trigger the animation completion handler even though - // the animation hasn't even started playing yet. - animationContext?.closure.ignoreDelegate = true - - makeAnimationLayer(usingEngine: .mainThread) - - // Set up the Main Thread animation layer using the same configuration that - // was being used by the previous Core Animation layer - self.currentFrame = currentFrame - - if let animationContext = animationContext { - // `AnimationContext.closure` (`AnimationCompletionDelegate`) is a reference type - // that is the animation layer's `CAAnimationDelegate`, and holds a reference to - // the animation layer. Reusing a single instance across different animation layers - // can cause the animation setup to fail, so we create a copy of the `animationContext`: - addNewAnimationForContext(AnimationContext( - playFrom: animationContext.playFrom, - playTo: animationContext.playTo, - closure: animationContext.closure.completionBlock)) - } - } - - fileprivate func updateAnimationForBackgroundState() { - if let currentContext = animationContext { - switch backgroundBehavior { - case .stop: - removeCurrentAnimation() - updateAnimationFrame(currentContext.playFrom) - case .pause: - removeCurrentAnimation() - case .pauseAndRestore: - currentContext.closure.ignoreDelegate = true - removeCurrentAnimation() - /// Keep the stale context around for when the app enters the foreground. - animationContext = currentContext - case .forceFinish: - removeCurrentAnimation() - updateAnimationFrame(currentContext.playTo) - case .continuePlaying: - break - } - } - } - - fileprivate func updateAnimationForForegroundState() { - if let currentContext = animationContext { - if waitingToPlayAnimation { - waitingToPlayAnimation = false - addNewAnimationForContext(currentContext) - } else if backgroundBehavior == .pauseAndRestore { - /// Restore animation from saved state - updateInFlightAnimation() - } - } - } - - /// Removes the current animation and pauses the animation at the current frame - /// if necessary before setting up a new animation. - /// - This is not necessary with the Core Animation engine, and skipping - /// this step lets us avoid building the animations twice (once paused - /// and once again playing) - /// - This method should only be called immediately before setting up another - /// animation -- otherwise this LottieAnimationView could be put in an inconsistent state. - fileprivate func removeCurrentAnimationIfNecessary() { - switch currentRenderingEngine { - case .mainThread: - removeCurrentAnimation() - case .coreAnimation, nil: - // We still need to remove the `animationContext`, since it should only be present - // when an animation is actually playing. Without this calling `removeCurrentAnimationIfNecessary()` - // and then setting the animation to a specific paused frame would put this - // `LottieAnimationView` in an inconsistent state. - animationContext = nil - } - } - - /// Stops the current in flight animation and freezes the animation in its current state. - fileprivate func removeCurrentAnimation() { - guard animationContext != nil else { return } - let pauseFrame = realtimeAnimationFrame - animationLayer?.removeAnimation(forKey: activeAnimationName) - updateAnimationFrame(pauseFrame) - animationContext = nil - } - - /// Adds animation to animation layer and sets the delegate. If animation layer or animation are nil, exits. - fileprivate func addNewAnimationForContext(_ animationContext: AnimationContext) { - guard let animationlayer = animationLayer, let animation = animation else { - return - } - - self.animationContext = animationContext - - switch currentRenderingEngine { - case .mainThread: - guard window != nil else { - waitingToPlayAnimation = true - return - } - - case .coreAnimation, nil: - // The Core Animation engine automatically batches animation setup to happen - // in `CALayer.display()`, which won't be called until the layer is on-screen, - // so we don't need to defer animation setup at this layer. - break - } - - animationID = animationID + 1 - _activeAnimationName = LottieAnimationView.animationName + String(animationID) - - if let coreAnimationLayer = animationlayer as? CoreAnimationLayer { - var animationContext = animationContext - - // Core Animation doesn't natively support negative speed values, - // so instead we can swap `playFrom` / `playTo` - if animationSpeed < 0 { - let temp = animationContext.playFrom - animationContext.playFrom = animationContext.playTo - animationContext.playTo = temp - } - - var timingConfiguration = CoreAnimationLayer.CAMediaTimingConfiguration( - autoreverses: loopMode.caAnimationConfiguration.autoreverses, - repeatCount: loopMode.caAnimationConfiguration.repeatCount, - speed: abs(Float(animationSpeed))) - - // The animation should start playing from the `currentFrame`, - // if `currentFrame` is included in the time range being played. - let lowerBoundTime = min(animationContext.playFrom, animationContext.playTo) - let upperBoundTime = max(animationContext.playFrom, animationContext.playTo) - if (lowerBoundTime ..< upperBoundTime).contains(round(currentFrame)) { - // We have to configure this differently depending on the loop mode: - switch loopMode { - // When playing exactly once (and not looping), we can just set the - // `playFrom` time to be the `currentFrame`. Since the animation duration - // is based on `playFrom` and `playTo`, this automatically truncates the - // duration (so the animation stops playing at `playFrom`). - // - Don't do this if the animation is already at that frame - // (e.g. playing from 100% to 0% when the animation is already at 0%) - // since that would cause the animation to not play at all. - case .playOnce: - if animationContext.playTo != currentFrame { - animationContext.playFrom = currentFrame - } - - // When looping, we specifically _don't_ want to affect the duration of the animation, - // since that would affect the duration of all subsequent loops. We just want to adjust - // the duration of the _first_ loop. Instead of setting `playFrom`, we just add a `timeOffset` - // so the first loop begins at `currentTime` but all subsequent loops are the standard duration. - default: - if animationSpeed < 0 { - timingConfiguration.timeOffset = animation.time(forFrame: animationContext.playFrom) - currentTime - } else { - timingConfiguration.timeOffset = currentTime - animation.time(forFrame: animationContext.playFrom) - } - } - } - - // If attempting to play a zero-duration animation, just pause on that single frame instead - if animationContext.playFrom == animationContext.playTo { - currentFrame = animationContext.playTo - animationContext.closure.completionBlock?(true) - return - } - - coreAnimationLayer.playAnimation(configuration: .init( - animationContext: animationContext, - timingConfiguration: timingConfiguration)) - - return - } - - /// At this point there is no animation on animationLayer and its state is set. - - let framerate = animation.framerate - - let playFrom = animationContext.playFrom.clamp(animation.startFrame, animation.endFrame) - let playTo = animationContext.playTo.clamp(animation.startFrame, animation.endFrame) - - let duration = ((max(playFrom, playTo) - min(playFrom, playTo)) / CGFloat(framerate)) - - let playingForward: Bool = - ( - (animationSpeed > 0 && playFrom < playTo) || - (animationSpeed < 0 && playTo < playFrom)) - - var startFrame = currentFrame.clamp(min(playFrom, playTo), max(playFrom, playTo)) - if startFrame == playTo { - startFrame = playFrom - } - - let timeOffset: TimeInterval = playingForward - ? Double(startFrame - min(playFrom, playTo)) / framerate - : Double(max(playFrom, playTo) - startFrame) / framerate - - let layerAnimation = CABasicAnimation(keyPath: "currentFrame") - layerAnimation.fromValue = playFrom - layerAnimation.toValue = playTo - layerAnimation.speed = Float(animationSpeed) - layerAnimation.duration = TimeInterval(duration) - layerAnimation.fillMode = CAMediaTimingFillMode.both - layerAnimation.repeatCount = loopMode.caAnimationConfiguration.repeatCount - layerAnimation.autoreverses = loopMode.caAnimationConfiguration.autoreverses - - layerAnimation.isRemovedOnCompletion = false - if timeOffset != 0 { - let currentLayerTime = viewLayer?.convertTime(CACurrentMediaTime(), from: nil) ?? 0 - layerAnimation.beginTime = currentLayerTime - (timeOffset * 1 / Double(abs(animationSpeed))) - } - layerAnimation.delegate = animationContext.closure - animationContext.closure.animationLayer = animationlayer - animationContext.closure.animationKey = activeAnimationName - - animationlayer.add(layerAnimation, forKey: activeAnimationName) - updateRasterizationState() - } - - // MARK: Private - - static private let animationName = "Lottie" - - private let logger: LottieLogger - - /// The `LottieBackgroundBehavior` that was specified manually by setting `self.backgroundBehavior` - private var _backgroundBehavior: LottieBackgroundBehavior? - -} - -// MARK: - LottieLoopMode + caAnimationConfiguration - -extension LottieLoopMode { - /// The `CAAnimation` configuration that reflects this mode - var caAnimationConfiguration: (repeatCount: Float, autoreverses: Bool) { - switch self { - case .playOnce: - return (repeatCount: 1, autoreverses: false) - case .loop: - return (repeatCount: .greatestFiniteMagnitude, autoreverses: false) - case .autoReverse: - return (repeatCount: .greatestFiniteMagnitude, autoreverses: true) - case .repeat(let amount): - return (repeatCount: amount, autoreverses: false) - case .repeatBackwards(let amount): - return (repeatCount: amount, autoreverses: true) - } - } -} diff --git a/Example/Pods/lottie-ios/Sources/Public/Animation/LottieAnimationViewInitializers.swift b/Example/Pods/lottie-ios/Sources/Public/Animation/LottieAnimationViewInitializers.swift deleted file mode 100644 index aa8aa02..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/Animation/LottieAnimationViewInitializers.swift +++ /dev/null @@ -1,222 +0,0 @@ -// -// AnimationViewInitializers.swift -// lottie-swift-iOS -// -// Created by Brandon Withrow on 2/6/19. -// - -import Foundation - -extension LottieAnimationView { - - // MARK: Lifecycle - - /// Loads a Lottie animation from a JSON file in the supplied bundle. - /// - /// - Parameter name: The string name of the lottie animation with no file extension provided. - /// - Parameter bundle: The bundle in which the animation is located. Defaults to the Main bundle. - /// - Parameter subdirectory: A subdirectory in the bundle in which the animation is located. Optional. - /// - Parameter imageProvider: An image provider for the animation's image data. - /// If none is supplied Lottie will search in the supplied bundle for images. - public convenience init( - name: String, - bundle: Bundle = Bundle.main, - subdirectory: String? = nil, - imageProvider: AnimationImageProvider? = nil, - animationCache: AnimationCacheProvider? = LottieAnimationCache.shared, - configuration: LottieConfiguration = .shared) - { - let animation = LottieAnimation.named(name, bundle: bundle, subdirectory: subdirectory, animationCache: animationCache) - let provider = imageProvider ?? BundleImageProvider(bundle: bundle, searchPath: nil) - self.init(animation: animation, imageProvider: provider, configuration: configuration) - } - - /// Loads a Lottie animation from a JSON file in a specific path on disk. - /// - /// - Parameter name: The absolute path of the Lottie Animation. - /// - Parameter imageProvider: An image provider for the animation's image data. - /// If none is supplied Lottie will search in the supplied filepath for images. - public convenience init( - filePath: String, - imageProvider: AnimationImageProvider? = nil, - animationCache: AnimationCacheProvider? = LottieAnimationCache.shared, - configuration: LottieConfiguration = .shared) - { - let animation = LottieAnimation.filepath(filePath, animationCache: animationCache) - let provider = imageProvider ?? - FilepathImageProvider(filepath: URL(fileURLWithPath: filePath).deletingLastPathComponent().path) - self.init(animation: animation, imageProvider: provider, configuration: configuration) - } - - /// Loads a Lottie animation asynchronously from the URL - /// - /// - Parameter url: The url to load the animation from. - /// - Parameter imageProvider: An image provider for the animation's image data. - /// If none is supplied Lottie will search in the main bundle for images. - /// - Parameter closure: A closure to be called when the animation has loaded. - public convenience init( - url: URL, - imageProvider: AnimationImageProvider? = nil, - session: URLSession = .shared, - closure: @escaping LottieAnimationView.DownloadClosure, - animationCache: AnimationCacheProvider? = LottieAnimationCache.shared, - configuration: LottieConfiguration = .shared) - { - if let animationCache = animationCache, let animation = animationCache.animation(forKey: url.absoluteString) { - self.init(animation: animation, imageProvider: imageProvider, configuration: configuration) - closure(nil) - } else { - self.init(animation: nil, imageProvider: imageProvider, configuration: configuration) - - LottieAnimation.loadedFrom(url: url, session: session, closure: { animation in - if let animation = animation { - self.animation = animation - closure(nil) - } else { - closure(LottieDownloadError.downloadFailed) - } - }, animationCache: animationCache) - } - } - - /// Loads a Lottie animation from a JSON file located in the Asset catalog of the supplied bundle. - /// - Parameter name: The string name of the lottie animation in the asset catalog. - /// - Parameter bundle: The bundle in which the animation is located. - /// Defaults to the Main bundle. - /// - Parameter imageProvider: An image provider for the animation's image data. - /// If none is supplied Lottie will search in the supplied bundle for images. - public convenience init( - asset name: String, - bundle: Bundle = Bundle.main, - imageProvider: AnimationImageProvider? = nil, - animationCache: AnimationCacheProvider? = LottieAnimationCache.shared, - configuration: LottieConfiguration = .shared) - { - let animation = LottieAnimation.asset(name, bundle: bundle, animationCache: animationCache) - let provider = imageProvider ?? BundleImageProvider(bundle: bundle, searchPath: nil) - self.init(animation: animation, imageProvider: provider, configuration: configuration) - } - - // MARK: DotLottie - - /// Loads a Lottie animation from a .lottie file in the supplied bundle. - /// - /// - Parameter dotLottieName: The name of the lottie file without the lottie extension. EG "StarAnimation" - /// - Parameter bundle: The bundle in which the lottie is located. Defaults to `Bundle.main` - /// - Parameter subdirectory: A subdirectory in the bundle in which the lottie is located. Optional. - /// - Parameter animationId: Animation id to play. Optional - /// - Parameter completion: A closure that is called when the .lottie file is finished loading - /// Defaults to first animation in file - public convenience init( - dotLottieName name: String, - bundle: Bundle = Bundle.main, - subdirectory: String? = nil, - animationId: String? = nil, - dotLottieCache: DotLottieCacheProvider? = DotLottieCache.sharedCache, - configuration: LottieConfiguration = .shared, - completion: ((LottieAnimationView, Error?) -> Void)? = nil) - { - self.init(dotLottie: nil, animationId: animationId, configuration: configuration) - DotLottieFile.named(name, bundle: bundle, subdirectory: subdirectory, dotLottieCache: dotLottieCache) { result in - switch result { - case .success(let dotLottieFile): - self.loadAnimation(animationId, from: dotLottieFile) - completion?(self, nil) - case .failure(let error): - completion?(self, error) - } - } - } - - /// Loads a Lottie from a .lottie file in a specific path on disk. - /// - /// - Parameter dotLottieFilePath: The absolute path of the Lottie file. - /// - Parameter animationId: Animation id to play. Optional - /// - Parameter completion: A closure that is called when the .lottie file is finished loading - /// Defaults to first animation in file - public convenience init( - dotLottieFilePath filePath: String, - animationId: String? = nil, - dotLottieCache: DotLottieCacheProvider? = DotLottieCache.sharedCache, - configuration: LottieConfiguration = .shared, - completion: ((LottieAnimationView, Error?) -> Void)? = nil) - { - self.init(dotLottie: nil, animationId: animationId, configuration: configuration) - DotLottieFile.loadedFrom(filepath: filePath, dotLottieCache: dotLottieCache) { result in - switch result { - case .success(let dotLottieFile): - self.loadAnimation(animationId, from: dotLottieFile) - completion?(self, nil) - case .failure(let error): - completion?(self, error) - } - } - } - - /// Loads a Lottie file asynchronously from the URL - /// - /// - Parameter dotLottieUrl: The url to load the lottie file from. - /// - Parameter animationId: Animation id to play. Optional. Defaults to first animation in file. - /// - Parameter completion: A closure to be called when the animation has loaded. - public convenience init( - dotLottieUrl url: URL, - animationId: String? = nil, - dotLottieCache: DotLottieCacheProvider? = DotLottieCache.sharedCache, - configuration: LottieConfiguration = .shared, - session: URLSession = .shared, - completion: ((LottieAnimationView, Error?) -> Void)? = nil) - { - if let dotLottieCache = dotLottieCache, let lottie = dotLottieCache.file(forKey: url.absoluteString) { - self.init(dotLottie: lottie, animationId: animationId, configuration: configuration) - completion?(self, nil) - } else { - self.init(dotLottie: nil, configuration: configuration) - DotLottieFile.loadedFrom(url: url, session: session, dotLottieCache: dotLottieCache) { result in - switch result { - case .success(let lottie): - self.loadAnimation(animationId, from: lottie) - completion?(self, nil) - case .failure(let error): - completion?(self, error) - } - } - } - } - - /// Loads a Lottie from a .lottie file located in the Asset catalog of the supplied bundle. - /// - Parameter name: The string name of the lottie file in the asset catalog. - /// - Parameter bundle: The bundle in which the file is located. Defaults to the Main bundle. - /// - Parameter animationId: Animation id to play. Optional - /// - Parameter completion: A closure that is called when the .lottie file is finished loading - /// Defaults to first animation in file - public convenience init( - dotLottieAsset name: String, - bundle: Bundle = Bundle.main, - animationId: String? = nil, - dotLottieCache: DotLottieCacheProvider? = DotLottieCache.sharedCache, - configuration: LottieConfiguration = .shared, - completion: ((LottieAnimationView, Error?) -> Void)? = nil) - { - self.init(dotLottie: nil, animationId: animationId, configuration: configuration) - DotLottieFile.asset(named: name, bundle: bundle, dotLottieCache: dotLottieCache) { result in - switch result { - case .success(let dotLottieFile): - self.loadAnimation(animationId, from: dotLottieFile) - completion?(self, nil) - case .failure(let error): - completion?(self, error) - } - } - } - - // MARK: Public - - public typealias DownloadClosure = (Error?) -> Void - -} - -// MARK: - LottieDownloadError - -enum LottieDownloadError: Error { - case downloadFailed -} diff --git a/Example/Pods/lottie-ios/Sources/Public/AnimationCache/AnimationCacheProvider.swift b/Example/Pods/lottie-ios/Sources/Public/AnimationCache/AnimationCacheProvider.swift deleted file mode 100644 index 2eef999..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/AnimationCache/AnimationCacheProvider.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// AnimationCacheProvider.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/5/19. -// - -import Foundation -/// `AnimationCacheProvider` is a protocol that describes an Animation Cache. -/// Animation Cache is used when loading `LottieAnimation` models. Using an Animation Cache -/// can increase performance when loading an animation multiple times. -/// -/// Lottie comes with a prebuilt LRU Animation Cache. -public protocol AnimationCacheProvider: AnyObject { - - func animation(forKey: String) -> LottieAnimation? - - func setAnimation(_ animation: LottieAnimation, forKey: String) - - func clearCache() - -} diff --git a/Example/Pods/lottie-ios/Sources/Public/AnimationCache/DefaultAnimationCache.swift b/Example/Pods/lottie-ios/Sources/Public/AnimationCache/DefaultAnimationCache.swift deleted file mode 100644 index dbe847f..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/AnimationCache/DefaultAnimationCache.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// DefaultAnimationCache.swift -// Lottie -// -// Created by Marcelo Fabri on 10/18/22. -// - -import Foundation - -/// A thread-safe Animation Cache that will store animations up to `cacheSize`. -/// -/// Once `cacheSize` is reached, animations can be ejected. -/// The default size of the cache is 100. -/// -/// This cache implementation also responds to memory pressure, as it's backed by `NSCache`. -public class DefaultAnimationCache: AnimationCacheProvider { - - // MARK: Lifecycle - - public init() { - cache.countLimit = Self.defaultCacheCountLimit - } - - // MARK: Public - - /// The global shared Cache. - public static let sharedCache = DefaultAnimationCache() - - /// The size of the cache. - public var cacheSize = defaultCacheCountLimit { - didSet { - cache.countLimit = cacheSize - } - } - - /// Clears the Cache. - public func clearCache() { - cache.removeAllObjects() - } - - public func animation(forKey key: String) -> LottieAnimation? { - cache.object(forKey: key as NSString) - } - - public func setAnimation(_ animation: LottieAnimation, forKey key: String) { - cache.setObject(animation, forKey: key as NSString) - } - - // MARK: Private - - private static let defaultCacheCountLimit = 100 - - private var cache = NSCache() -} diff --git a/Example/Pods/lottie-ios/Sources/Public/AnimationCache/LRUAnimationCache.swift b/Example/Pods/lottie-ios/Sources/Public/AnimationCache/LRUAnimationCache.swift deleted file mode 100644 index ad40161..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/AnimationCache/LRUAnimationCache.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// LRUAnimationCache.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/5/19. -// - -import Foundation - -@available(*, deprecated, message: """ - Use DefaultAnimationCache instead, which is thread-safe and automatically responds to memory pressure. - """) -public typealias LRUAnimationCache = DefaultAnimationCache diff --git a/Example/Pods/lottie-ios/Sources/Public/AnimationCache/LottieAnimationCache.swift b/Example/Pods/lottie-ios/Sources/Public/AnimationCache/LottieAnimationCache.swift deleted file mode 100644 index efb6a3e..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/AnimationCache/LottieAnimationCache.swift +++ /dev/null @@ -1,15 +0,0 @@ -// -// LottieAnimationCache.swift -// Lottie -// -// Created by Marcelo Fabri on 10/17/22. -// - -/// A customization point to configure which `AnimationCacheProvider` will be used. -public enum LottieAnimationCache { - - /// The animation cache that will be used when loading `LottieAnimation` models. - /// Using an Animation Cache can increase performance when loading an animation multiple times. - /// Defaults to DefaultAnimationCache.sharedCache. - public static var shared: AnimationCacheProvider? = DefaultAnimationCache.sharedCache -} diff --git a/Example/Pods/lottie-ios/Sources/Public/DotLottie/Cache/DotLottieCache.swift b/Example/Pods/lottie-ios/Sources/Public/DotLottie/Cache/DotLottieCache.swift deleted file mode 100644 index b8939a7..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/DotLottie/Cache/DotLottieCache.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// LRUDotLottieCache.swift -// Lottie -// -// Created by Evandro Hoffmann on 20/10/22. -// - -import Foundation - -/// A DotLottie Cache that will store lottie files up to `cacheSize`. -/// -/// Once `cacheSize` is reached, the least recently used lottie will be ejected. -/// The default size of the cache is 100. -public class DotLottieCache: DotLottieCacheProvider { - - // MARK: Lifecycle - - public init() { - cache.countLimit = Self.defaultCacheCountLimit - } - - // MARK: Public - - /// The global shared Cache. - public static let sharedCache = DotLottieCache() - - /// The size of the cache. - public var cacheSize = defaultCacheCountLimit { - didSet { - cache.countLimit = cacheSize - } - } - - /// Clears the Cache. - public func clearCache() { - cache.removeAllObjects() - } - - public func file(forKey key: String) -> DotLottieFile? { - cache.object(forKey: key as NSString) - } - - public func setFile(_ lottie: DotLottieFile, forKey key: String) { - cache.setObject(lottie, forKey: key as NSString) - } - - // MARK: Private - - private static let defaultCacheCountLimit = 100 - - private var cache = NSCache() - -} diff --git a/Example/Pods/lottie-ios/Sources/Public/DotLottie/Cache/DotLottieCacheProvider.swift b/Example/Pods/lottie-ios/Sources/Public/DotLottie/Cache/DotLottieCacheProvider.swift deleted file mode 100644 index 11beb4b..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/DotLottie/Cache/DotLottieCacheProvider.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// DotLottieCacheProvider.swift -// Lottie -// -// Created by Evandro Hoffmann on 20/10/22. -// - -import Foundation - -/// `DotLottieCacheProvider` is a protocol that describes a DotLottie Cache. -/// DotLottie Cache is used when loading `DotLottie` models. Using a DotLottie Cache -/// can increase performance when loading an animation multiple times. -/// -/// Lottie comes with a prebuilt LRU DotLottie Cache. -public protocol DotLottieCacheProvider { - - func file(forKey: String) -> DotLottieFile? - - func setFile(_ lottie: DotLottieFile, forKey: String) - - func clearCache() - -} diff --git a/Example/Pods/lottie-ios/Sources/Public/DotLottie/DotLottieFile.swift b/Example/Pods/lottie-ios/Sources/Public/DotLottie/DotLottieFile.swift deleted file mode 100644 index 2ff14d0..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/DotLottie/DotLottieFile.swift +++ /dev/null @@ -1,138 +0,0 @@ -// -// DotLottie.swift -// Lottie -// -// Created by Evandro Harrison Hoffmann on 27/06/2020. -// - -import Foundation - -// MARK: - DotLottieFile - -/// Detailed .lottie file structure -public final class DotLottieFile { - - // MARK: Lifecycle - - /// Loads `DotLottie` from `Data` object containing a compressed animation. - /// - /// - Parameters: - /// - data: Data of .lottie file - /// - filename: Name of .lottie file - /// - Returns: Deserialized `DotLottie`. Optional. - init(data: Data, filename: String) throws { - fileUrl = DotLottieUtils.tempDirectoryURL.appendingPathComponent(filename.asFilename()) - try decompress(data: data, to: fileUrl) - } - - // MARK: Internal - - /// Definition for a single animation within a `DotLottieFile` - struct Animation { - let animation: LottieAnimation - let configuration: DotLottieConfiguration - } - - /// List of `LottieAnimation` in the file - private(set) var animations: [Animation] = [] - - /// Image provider for animations - private(set) var imageProvider: AnimationImageProvider? - - /// Animations folder url - lazy var animationsUrl: URL = fileUrl.appendingPathComponent("\(DotLottieFile.animationsFolderName)") - - /// All files in animations folder - lazy var animationUrls: [URL] = FileManager.default.urls(for: animationsUrl) ?? [] - - /// Images folder url - lazy var imagesUrl: URL = fileUrl.appendingPathComponent("\(DotLottieFile.imagesFolderName)") - - /// All images in images folder - lazy var imageUrls: [URL] = FileManager.default.urls(for: imagesUrl) ?? [] - - /// The `LottieAnimation` and `DotLottieConfiguration` for the given animation ID in this file - func animation(for id: String? = nil) -> DotLottieFile.Animation? { - if let id = id { - return animations.first(where: { $0.configuration.id == id }) - } else { - return animations.first - } - } - - // MARK: Private - - private static let manifestFileName = "manifest.json" - private static let animationsFolderName = "animations" - private static let imagesFolderName = "images" - - private let fileUrl: URL - - /// Decompresses .lottie file from `URL` and saves to local temp folder - /// - /// - Parameters: - /// - url: url to .lottie file - /// - destinationURL: url to destination of decompression contents - private func decompress(from url: URL, to destinationURL: URL) throws { - try? FileManager.default.removeItem(at: destinationURL) - try FileManager.default.createDirectory(at: destinationURL, withIntermediateDirectories: true, attributes: nil) - try FileManager.default.unzipItem(at: url, to: destinationURL) - try loadContent() - try? FileManager.default.removeItem(at: destinationURL) - try? FileManager.default.removeItem(at: url) - } - - /// Decompresses .lottie file from `Data` and saves to local temp folder - /// - /// - Parameters: - /// - url: url to .lottie file - /// - destinationURL: url to destination of decompression contents - private func decompress(data: Data, to destinationURL: URL) throws { - let url = destinationURL.appendingPathExtension("lottie") - try FileManager.default.createDirectory(at: destinationURL, withIntermediateDirectories: true, attributes: nil) - try data.write(to: url) - try decompress(from: url, to: destinationURL) - } - - /// Loads file content to memory - private func loadContent() throws { - imageProvider = DotLottieImageProvider(filepath: imagesUrl) - - animations = try loadManifest().animations.map { dotLottieAnimation in - let animation = try dotLottieAnimation.animation(url: animationsUrl) - let configuration = DotLottieConfiguration( - id: dotLottieAnimation.id, - imageProvider: imageProvider, - loopMode: dotLottieAnimation.loopMode, - speed: dotLottieAnimation.animationSpeed) - - return DotLottieFile.Animation( - animation: animation, - configuration: configuration) - } - } - - private func loadManifest() throws -> DotLottieManifest { - let path = fileUrl.appendingPathComponent(DotLottieFile.manifestFileName) - return try DotLottieManifest.load(from: path) - } -} - -extension String { - - // MARK: Fileprivate - - fileprivate func asFilename() -> String { - lastPathComponent().removingPathExtension() - } - - // MARK: Private - - private func lastPathComponent() -> String { - (self as NSString).lastPathComponent - } - - private func removingPathExtension() -> String { - (self as NSString).deletingPathExtension - } -} diff --git a/Example/Pods/lottie-ios/Sources/Public/DotLottie/DotLottieFileHelpers.swift b/Example/Pods/lottie-ios/Sources/Public/DotLottie/DotLottieFileHelpers.swift deleted file mode 100644 index 52ccfe0..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/DotLottie/DotLottieFileHelpers.swift +++ /dev/null @@ -1,292 +0,0 @@ -// -// DotLottieFileHelpers.swift -// Lottie -// -// Created by Evandro Hoffmann on 20/10/22. -// - -import Foundation - -extension DotLottieFile { - - public enum SynchronouslyBlockingCurrentThread { - /// Loads an DotLottie from a specific filepath synchronously. Returns a `Result` - /// Please use the asynchronous methods whenever possible. This operation will block the Thread it is running in. - /// - /// - Parameter filepath: The absolute filepath of the lottie to load. EG "/User/Me/starAnimation.lottie" - /// - Parameter dotLottieCache: A cache for holding loaded lotties. Defaults to `LRUDotLottieCache.sharedCache`. Optional. - public static func loadedFrom( - filepath: String, - dotLottieCache: DotLottieCacheProvider? = DotLottieCache.sharedCache) - -> Result - { - /// Check cache for lottie - if - let dotLottieCache = dotLottieCache, - let lottie = dotLottieCache.file(forKey: filepath) - { - return .success(lottie) - } - - do { - /// Decode the lottie. - let url = URL(fileURLWithPath: filepath) - let data = try Data(contentsOf: url) - let lottie = try DotLottieFile(data: data, filename: url.deletingPathExtension().lastPathComponent) - dotLottieCache?.setFile(lottie, forKey: filepath) - return .success(lottie) - } catch { - /// Decoding Error. - return .failure(error) - } - } - - /// Loads a DotLottie model from a bundle by its name synchronously. Returns a `Result` - /// Please use the asynchronous methods whenever possible. This operation will block the Thread it is running in. - /// - /// - Parameter name: The name of the lottie file without the lottie extension. EG "StarAnimation" - /// - Parameter bundle: The bundle in which the lottie is located. Defaults to `Bundle.main` - /// - Parameter subdirectory: A subdirectory in the bundle in which the lottie is located. Optional. - /// - Parameter dotLottieCache: A cache for holding loaded lotties. Defaults to `LRUDotLottieCache.sharedCache`. Optional. - public static func named( - _ name: String, - bundle: Bundle = Bundle.main, - subdirectory: String? = nil, - dotLottieCache: DotLottieCacheProvider? = DotLottieCache.sharedCache) - -> Result - { - /// Create a cache key for the lottie. - let cacheKey = bundle.bundlePath + (subdirectory ?? "") + "/" + name - - /// Check cache for lottie - if - let dotLottieCache = dotLottieCache, - let lottie = dotLottieCache.file(forKey: cacheKey) - { - return .success(lottie) - } - - do { - /// Decode animation. - let data = try bundle.dotLottieData(name, subdirectory: subdirectory) - let lottie = try DotLottieFile(data: data, filename: name) - dotLottieCache?.setFile(lottie, forKey: cacheKey) - return .success(lottie) - } catch { - /// Decoding error. - LottieLogger.shared.warn("Error when decoding lottie \"\(name)\": \(error)") - return .failure(error) - } - } - } - - /// Loads a DotLottie model from a bundle by its name. Returns `nil` if a file is not found. - /// - /// - Parameter name: The name of the lottie file without the lottie extension. EG "StarAnimation" - /// - Parameter bundle: The bundle in which the lottie is located. Defaults to `Bundle.main` - /// - Parameter subdirectory: A subdirectory in the bundle in which the lottie is located. Optional. - /// - Parameter dotLottieCache: A cache for holding loaded lotties. Defaults to `LRUDotLottieCache.sharedCache`. Optional. - @available(iOS 13.0, macOS 10.15, tvOS 13.0, *) - public static func named( - _ name: String, - bundle: Bundle = Bundle.main, - subdirectory: String? = nil, - dotLottieCache: DotLottieCacheProvider? = DotLottieCache.sharedCache) - async throws -> DotLottieFile - { - try await withCheckedThrowingContinuation { continuation in - DotLottieFile.named(name, bundle: bundle, subdirectory: subdirectory, dotLottieCache: dotLottieCache) { result in - continuation.resume(with: result) - } - } - } - - /// Loads a DotLottie model from a bundle by its name. Returns `nil` if a file is not found. - /// - /// - Parameter name: The name of the lottie file without the lottie extension. EG "StarAnimation" - /// - Parameter bundle: The bundle in which the lottie is located. Defaults to `Bundle.main` - /// - Parameter subdirectory: A subdirectory in the bundle in which the lottie is located. Optional. - /// - Parameter dotLottieCache: A cache for holding loaded lotties. Defaults to `LRUDotLottieCache.sharedCache`. Optional. - /// - Parameter dispatchQueue: A dispatch queue used to load animations. Defaults to `DispatchQueue.global()`. Optional. - /// - Parameter handleResult: A closure to be called when the file has loaded. - public static func named( - _ name: String, - bundle: Bundle = Bundle.main, - subdirectory: String? = nil, - dotLottieCache: DotLottieCacheProvider? = DotLottieCache.sharedCache, - dispatchQueue: DispatchQueue = .global(), - handleResult: @escaping (Result) -> Void) - { - dispatchQueue.async { - let result = SynchronouslyBlockingCurrentThread.named( - name, - bundle: bundle, - subdirectory: subdirectory, - dotLottieCache: dotLottieCache) - - DispatchQueue.main.async { - handleResult(result) - } - } - } - - /// Loads an DotLottie from a specific filepath. - /// - Parameter filepath: The absolute filepath of the lottie to load. EG "/User/Me/starAnimation.lottie" - /// - Parameter dotLottieCache: A cache for holding loaded lotties. Defaults to `LRUDotLottieCache.sharedCache`. Optional. - @available(iOS 13.0, macOS 10.15, tvOS 13.0, *) - public static func loadedFrom( - filepath: String, - dotLottieCache: DotLottieCacheProvider? = DotLottieCache.sharedCache) - async throws -> DotLottieFile - { - try await withCheckedThrowingContinuation { continuation in - DotLottieFile.loadedFrom(filepath: filepath, dotLottieCache: dotLottieCache) { result in - continuation.resume(with: result) - } - } - } - - /// Loads an DotLottie from a specific filepath. - /// - Parameter filepath: The absolute filepath of the lottie to load. EG "/User/Me/starAnimation.lottie" - /// - Parameter dotLottieCache: A cache for holding loaded lotties. Defaults to `LRUDotLottieCache.sharedCache`. Optional. - /// - Parameter dispatchQueue: A dispatch queue used to load animations. Defaults to `DispatchQueue.global()`. Optional. - /// - Parameter handleResult: A closure to be called when the file has loaded. - public static func loadedFrom( - filepath: String, - dotLottieCache: DotLottieCacheProvider? = DotLottieCache.sharedCache, - dispatchQueue: DispatchQueue = .global(), - handleResult: @escaping (Result) -> Void) - { - dispatchQueue.async { - let result = SynchronouslyBlockingCurrentThread.loadedFrom( - filepath: filepath, - dotLottieCache: dotLottieCache) - - DispatchQueue.main.async { - handleResult(result) - } - } - } - - /// Loads a DotLottie model from the asset catalog by its name. Returns `nil` if a lottie is not found. - /// - Parameter name: The name of the lottie file in the asset catalog. EG "StarAnimation" - /// - Parameter bundle: The bundle in which the lottie is located. Defaults to `Bundle.main` - /// - Parameter dotLottieCache: A cache for holding loaded lottie files. Defaults to `LRUDotLottieCache.sharedCache` Optional. - @available(iOS 13.0, macOS 10.15, tvOS 13.0, *) - public static func asset( - named name: String, - bundle: Bundle = Bundle.main, - dotLottieCache: DotLottieCacheProvider? = DotLottieCache.sharedCache) - async throws -> DotLottieFile - { - try await withCheckedThrowingContinuation { continuation in - DotLottieFile.asset(named: name, bundle: bundle, dotLottieCache: dotLottieCache) { result in - continuation.resume(with: result) - } - } - } - - /// Loads a DotLottie model from the asset catalog by its name. Returns `nil` if a lottie is not found. - /// - Parameter name: The name of the lottie file in the asset catalog. EG "StarAnimation" - /// - Parameter bundle: The bundle in which the lottie is located. Defaults to `Bundle.main` - /// - Parameter dotLottieCache: A cache for holding loaded lottie files. Defaults to `LRUDotLottieCache.sharedCache` Optional. - /// - Parameter dispatchQueue: A dispatch queue used to load animations. Defaults to `DispatchQueue.global()`. Optional. - /// - Parameter handleResult: A closure to be called when the file has loaded. - public static func asset( - named name: String, - bundle: Bundle = Bundle.main, - dotLottieCache: DotLottieCacheProvider? = DotLottieCache.sharedCache, - dispatchQueue: DispatchQueue = .global(), - handleResult: @escaping (Result) -> Void) - { - dispatchQueue.async { - /// Create a cache key for the lottie. - let cacheKey = bundle.bundlePath + "/" + name - - /// Check cache for lottie - if - let dotLottieCache = dotLottieCache, - let lottie = dotLottieCache.file(forKey: cacheKey) - { - /// If found, return the lottie. - DispatchQueue.main.async { - handleResult(.success(lottie)) - } - return - } - - do { - /// Load data from Asset - let data = try Data(assetName: name, in: bundle) - - /// Decode lottie. - let lottie = try DotLottieFile(data: data, filename: name) - dotLottieCache?.setFile(lottie, forKey: cacheKey) - DispatchQueue.main.async { - handleResult(.success(lottie)) - } - } catch { - /// Decoding error. - DispatchQueue.main.async { - handleResult(.failure(error)) - } - } - } - } - - /// Loads a DotLottie animation asynchronously from the URL. - /// - /// - Parameter url: The url to load the animation from. - /// - Parameter animationCache: A cache for holding loaded animations. Defaults to `LRUAnimationCache.sharedCache`. Optional. - @available(iOS 13.0, macOS 10.15, tvOS 13.0, *) - public static func loadedFrom( - url: URL, - session: URLSession = .shared, - dotLottieCache: DotLottieCacheProvider? = DotLottieCache.sharedCache) - async throws -> DotLottieFile - { - try await withCheckedThrowingContinuation { continuation in - DotLottieFile.loadedFrom(url: url, session: session, dotLottieCache: dotLottieCache) { result in - continuation.resume(with: result) - } - } - } - - /// Loads a DotLottie animation asynchronously from the URL. - /// - /// - Parameter url: The url to load the animation from. - /// - Parameter animationCache: A cache for holding loaded animations. Defaults to `LRUAnimationCache.sharedCache`. Optional. - /// - Parameter handleResult: A closure to be called when the animation has loaded. - public static func loadedFrom( - url: URL, - session: URLSession = .shared, - dotLottieCache: DotLottieCacheProvider? = DotLottieCache.sharedCache, - handleResult: @escaping (Result) -> Void) - { - if let dotLottieCache = dotLottieCache, let lottie = dotLottieCache.file(forKey: url.absoluteString) { - handleResult(.success(lottie)) - } else { - let task = session.dataTask(with: url) { data, _, error in - do { - if let error = error { - throw error - } - guard let data = data else { - throw DotLottieError.noDataLoaded - } - let lottie = try DotLottieFile(data: data, filename: url.deletingPathExtension().lastPathComponent) - DispatchQueue.main.async { - dotLottieCache?.setFile(lottie, forKey: url.absoluteString) - handleResult(.success(lottie)) - } - } catch { - DispatchQueue.main.async { - handleResult(.failure(error)) - } - } - } - task.resume() - } - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/AnimationKeypath.swift b/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/AnimationKeypath.swift deleted file mode 100644 index 93b8d7b..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/AnimationKeypath.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// AnimationKeypath.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/4/19. -// - -import Foundation - -/// `AnimationKeypath` is an object that describes a keypath search for nodes in the -/// animation JSON. `AnimationKeypath` matches views and properties inside of `LottieAnimationView` -/// to their backing `LottieAnimation` model by name. -/// -/// A keypath can be used to set properties on an existing animation, or can be validated -/// with an existing `LottieAnimation`. -/// -/// `AnimationKeypath` can describe a specific object, or can use wildcards for fuzzy matching -/// of objects. Acceptable wildcards are either "*" (star) or "**" (double star). -/// Single star will search a single depth for the next object. -/// Double star will search any depth. -/// -/// Read More at https://airbnb.io/lottie/#/ios?id=dynamic-animation-properties -/// -/// EG: -/// @"Layer.Shape Group.Stroke 1.Color" -/// Represents a specific color node on a specific stroke. -/// -/// @"**.Stroke 1.Color" -/// Represents the color node for every Stroke named "Stroke 1" in the animation. -public struct AnimationKeypath: Hashable, ExpressibleByStringLiteral { - - /// Creates a keypath from a dot-separated string. The string is separated by "." - public init(keypath: String) { - keys = keypath.components(separatedBy: ".") - } - - /// Creates a keypath from a dot-separated string - public init(stringLiteral: String) { - self.init(keypath: stringLiteral) - } - - /// Creates a keypath from a list of strings. - public init(keys: [String]) { - self.keys = keys - } - - var keys: [String] - -} diff --git a/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/AnyValueProvider.swift b/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/AnyValueProvider.swift deleted file mode 100644 index f6575b5..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/AnyValueProvider.swift +++ /dev/null @@ -1,132 +0,0 @@ -// -// AnyValueProvider.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/30/19. -// - -import CoreGraphics -import Foundation - -// MARK: - AnyValueProvider - -/// `AnyValueProvider` is a protocol that return animation data for a property at a -/// given time. Every frame a `LottieAnimationView` queries all of its properties and asks -/// if their ValueProvider has an update. If it does the LottieAnimationView will read the -/// property and update that portion of the animation. -/// -/// Value Providers can be used to dynamically set animation properties at run time. -public protocol AnyValueProvider { - - /// The Type of the value provider - var valueType: Any.Type { get } - - /// The type-erased storage for this Value Provider - var typeErasedStorage: AnyValueProviderStorage { get } - - /// Asks the provider if it has an update for the given frame. - func hasUpdate(frame: AnimationFrameTime) -> Bool - -} - -extension AnyValueProvider { - /// Asks the provider to update the container with its value for the frame. - public func value(frame: AnimationFrameTime) -> Any { - typeErasedStorage.value(frame: frame) - } -} - -// MARK: - ValueProvider - -/// A base protocol for strongly-typed Value Providers -protocol ValueProvider: AnyValueProvider { - associatedtype Value: AnyInterpolatable - - /// The strongly-typed storage for this Value Provider - var storage: ValueProviderStorage { get } -} - -extension ValueProvider { - public var typeErasedStorage: AnyValueProviderStorage { - switch storage { - case .closure(let typedClosure): - return .closure(typedClosure) - - case .singleValue(let typedValue): - return .singleValue(typedValue) - - case .keyframes(let keyframes): - return .keyframes( - keyframes.map { keyframe in - keyframe.withValue(keyframe.value as Any) - }, - interpolate: storage.value(frame:)) - } - } -} - -// MARK: - ValueProviderStorage - -/// The underlying storage of a `ValueProvider` -public enum ValueProviderStorage { - /// The value provider stores a single value that is used on all frames - case singleValue(T) - - /// The value provider stores a group of keyframes - /// - The main-thread rendering engine interpolates values in these keyframes - /// using `T`'s `Interpolatable` implementation. - /// - The Core Animation rendering engine constructs a `CAKeyframeAnimation` - /// using these keyframes. The Core Animation render server performs - /// the interpolation, without calling `T`'s `Interpolatable` implementation. - case keyframes([Keyframe]) - - /// The value provider stores a closure that is invoked on every frame - /// - This is only supported by the main-thread rendering engine - case closure((AnimationFrameTime) -> T) - - // MARK: Internal - - func value(frame: AnimationFrameTime) -> T { - switch self { - case .singleValue(let value): - return value - - case .closure(let closure): - return closure(frame) - - case .keyframes(let keyframes): - return KeyframeInterpolator(keyframes: ContiguousArray(keyframes)).storage.value(frame: frame) - } - } -} - -// MARK: - AnyValueProviderStorage - -/// A type-erased representation of `ValueProviderStorage` -public enum AnyValueProviderStorage { - /// The value provider stores a single value that is used on all frames - case singleValue(Any) - - /// The value provider stores a group of keyframes - /// - Since we can't interpolate a type-erased `KeyframeGroup`, - /// the interpolation has to be performed in the `interpolate` closure. - case keyframes([Keyframe], interpolate: (AnimationFrameTime) -> Any) - - /// The value provider stores a closure that is invoked on every frame - case closure((AnimationFrameTime) -> Any) - - // MARK: Internal - - func value(frame: AnimationFrameTime) -> Any { - switch self { - case .singleValue(let value): - return value - - case .closure(let closure): - return closure(frame) - - case .keyframes(_, let valueForFrame): - return valueForFrame(frame) - } - } -} diff --git a/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/ValueProviders/ColorValueProvider.swift b/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/ValueProviders/ColorValueProvider.swift deleted file mode 100644 index a9271c1..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/ValueProviders/ColorValueProvider.swift +++ /dev/null @@ -1,84 +0,0 @@ -// -// ColorValueProvider.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/4/19. -// - -import CoreGraphics -import Foundation - -/// A `ValueProvider` that returns a CGColor Value -public final class ColorValueProvider: ValueProvider { - - // MARK: Lifecycle - - /// Initializes with a block provider - public init(block: @escaping ColorValueBlock) { - self.block = block - color = LottieColor(r: 0, g: 0, b: 0, a: 1) - keyframes = nil - } - - /// Initializes with a single color. - public init(_ color: LottieColor) { - self.color = color - block = nil - keyframes = nil - hasUpdate = true - } - - /// Initializes with multiple colors, with timing information - public init(_ keyframes: [Keyframe]) { - self.keyframes = keyframes - color = LottieColor(r: 0, g: 0, b: 0, a: 1) - block = nil - hasUpdate = true - } - - // MARK: Public - - /// Returns a LottieColor for a CGColor(Frame Time) - public typealias ColorValueBlock = (CGFloat) -> LottieColor - - /// The color value of the provider. - public var color: LottieColor { - didSet { - hasUpdate = true - } - } - - // MARK: ValueProvider Protocol - - public var valueType: Any.Type { - LottieColor.self - } - - public var storage: ValueProviderStorage { - if let block = block { - return .closure { frame in - self.hasUpdate = false - return block(frame) - } - } else if let keyframes = keyframes { - return .keyframes(keyframes) - } else { - hasUpdate = false - return .singleValue(color) - } - } - - public func hasUpdate(frame _: CGFloat) -> Bool { - if block != nil { - return true - } - return hasUpdate - } - - // MARK: Private - - private var hasUpdate = true - - private var block: ColorValueBlock? - private var keyframes: [Keyframe]? -} diff --git a/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/ValueProviders/FloatValueProvider.swift b/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/ValueProviders/FloatValueProvider.swift deleted file mode 100644 index b8f7c44..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/ValueProviders/FloatValueProvider.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// DoubleValueProvider.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/4/19. -// - -import CoreGraphics -import Foundation - -/// A `ValueProvider` that returns a CGFloat Value -public final class FloatValueProvider: ValueProvider { - - // MARK: Lifecycle - - /// Initializes with a block provider - public init(block: @escaping CGFloatValueBlock) { - self.block = block - float = 0 - } - - /// Initializes with a single float. - public init(_ float: CGFloat) { - self.float = float - block = nil - hasUpdate = true - } - - // MARK: Public - - /// Returns a CGFloat for a CGFloat(Frame Time) - public typealias CGFloatValueBlock = (CGFloat) -> CGFloat - - public var float: CGFloat { - didSet { - hasUpdate = true - } - } - - // MARK: ValueProvider Protocol - - public var valueType: Any.Type { - LottieVector1D.self - } - - public var storage: ValueProviderStorage { - if let block = block { - return .closure { frame in - self.hasUpdate = false - return LottieVector1D(Double(block(frame))) - } - } else { - hasUpdate = false - return .singleValue(LottieVector1D(Double(float))) - } - } - - public func hasUpdate(frame _: CGFloat) -> Bool { - if block != nil { - return true - } - return hasUpdate - } - - // MARK: Private - - private var hasUpdate = true - - private var block: CGFloatValueBlock? -} diff --git a/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/ValueProviders/GradientValueProvider.swift b/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/ValueProviders/GradientValueProvider.swift deleted file mode 100644 index fc4bf6d..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/ValueProviders/GradientValueProvider.swift +++ /dev/null @@ -1,123 +0,0 @@ -// -// GradientValueProvider.swift -// lottie-swift -// -// Created by Enrique Bermúdez on 10/27/19. -// - -import CoreGraphics -import Foundation - -/// A `ValueProvider` that returns a Gradient Color Value. -public final class GradientValueProvider: ValueProvider { - - // MARK: Lifecycle - - /// Initializes with a block provider. - public init( - block: @escaping ColorsValueBlock, - locations: ColorLocationsBlock? = nil) - { - self.block = block - locationsBlock = locations - colors = [] - self.locations = [] - } - - /// Initializes with an array of colors. - public init( - _ colors: [LottieColor], - locations: [Double] = []) - { - self.colors = colors - self.locations = locations - updateValueArray() - hasUpdate = true - } - - // MARK: Public - - /// Returns a [LottieColor] for a CGFloat(Frame Time). - public typealias ColorsValueBlock = (CGFloat) -> [LottieColor] - /// Returns a [Double](Color locations) for a CGFloat(Frame Time). - public typealias ColorLocationsBlock = (CGFloat) -> [Double] - - /// The colors values of the provider. - public var colors: [LottieColor] { - didSet { - updateValueArray() - hasUpdate = true - } - } - - /// The color location values of the provider. - public var locations: [Double] { - didSet { - updateValueArray() - hasUpdate = true - } - } - - // MARK: ValueProvider Protocol - - public var valueType: Any.Type { - [Double].self - } - - public var storage: ValueProviderStorage<[Double]> { - .closure { [self] frame in - hasUpdate = false - - if let block = block { - let newColors = block(frame) - let newLocations = locationsBlock?(frame) ?? [] - value = value(from: newColors, locations: newLocations) - } - - return value - } - } - - public func hasUpdate(frame _: CGFloat) -> Bool { - if block != nil || locationsBlock != nil { - return true - } - return hasUpdate - } - - // MARK: Private - - private var hasUpdate = true - - private var block: ColorsValueBlock? - private var locationsBlock: ColorLocationsBlock? - private var value: [Double] = [] - - private func value(from colors: [LottieColor], locations: [Double]) -> [Double] { - var colorValues = [Double]() - var alphaValues = [Double]() - var shouldAddAlphaValues = false - - for i in 0.. i - ? locations[i] - : (Double(i) / Double(colors.count - 1)) - - colorValues.append(location) - colorValues.append(colors[i].r) - colorValues.append(colors[i].g) - colorValues.append(colors[i].b) - - alphaValues.append(location) - alphaValues.append(colors[i].a) - } - - return colorValues + (shouldAddAlphaValues ? alphaValues : []) - } - - private func updateValueArray() { - value = value(from: colors, locations: locations) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/ValueProviders/PointValueProvider.swift b/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/ValueProviders/PointValueProvider.swift deleted file mode 100644 index 8dd177a..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/ValueProviders/PointValueProvider.swift +++ /dev/null @@ -1,69 +0,0 @@ -// -// PointValueProvider.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/4/19. -// - -import CoreGraphics -import Foundation -/// A `ValueProvider` that returns a CGPoint Value -public final class PointValueProvider: ValueProvider { - - // MARK: Lifecycle - - /// Initializes with a block provider - public init(block: @escaping PointValueBlock) { - self.block = block - point = .zero - } - - /// Initializes with a single point. - public init(_ point: CGPoint) { - self.point = point - block = nil - hasUpdate = true - } - - // MARK: Public - - /// Returns a CGPoint for a CGFloat(Frame Time) - public typealias PointValueBlock = (CGFloat) -> CGPoint - - public var point: CGPoint { - didSet { - hasUpdate = true - } - } - - // MARK: ValueProvider Protocol - - public var valueType: Any.Type { - LottieVector3D.self - } - - public var storage: ValueProviderStorage { - if let block = block { - return .closure { frame in - self.hasUpdate = false - return block(frame).vector3dValue - } - } else { - hasUpdate = false - return .singleValue(point.vector3dValue) - } - } - - public func hasUpdate(frame _: CGFloat) -> Bool { - if block != nil { - return true - } - return hasUpdate - } - - // MARK: Private - - private var hasUpdate = true - - private var block: PointValueBlock? -} diff --git a/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/ValueProviders/SizeValueProvider.swift b/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/ValueProviders/SizeValueProvider.swift deleted file mode 100644 index f62e7ed..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/DynamicProperties/ValueProviders/SizeValueProvider.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// SizeValueProvider.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/4/19. -// - -import CoreGraphics -import Foundation - -/// A `ValueProvider` that returns a CGSize Value -public final class SizeValueProvider: ValueProvider { - - // MARK: Lifecycle - - /// Initializes with a block provider - public init(block: @escaping SizeValueBlock) { - self.block = block - size = .zero - } - - /// Initializes with a single size. - public init(_ size: CGSize) { - self.size = size - block = nil - hasUpdate = true - } - - // MARK: Public - - /// Returns a CGSize for a CGFloat(Frame Time) - public typealias SizeValueBlock = (CGFloat) -> CGSize - - public var size: CGSize { - didSet { - hasUpdate = true - } - } - - // MARK: ValueProvider Protocol - - public var valueType: Any.Type { - LottieVector3D.self - } - - public var storage: ValueProviderStorage { - if let block = block { - return .closure { frame in - self.hasUpdate = false - return block(frame).vector3dValue - } - } else { - hasUpdate = false - return .singleValue(size.vector3dValue) - } - } - - public func hasUpdate(frame _: CGFloat) -> Bool { - if block != nil { - return true - } - return hasUpdate - } - - // MARK: Private - - private var hasUpdate = true - - private var block: SizeValueBlock? -} diff --git a/Example/Pods/lottie-ios/Sources/Public/FontProvider/AnimationFontProvider.swift b/Example/Pods/lottie-ios/Sources/Public/FontProvider/AnimationFontProvider.swift deleted file mode 100644 index 3731a3f..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/FontProvider/AnimationFontProvider.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// AnimationFontProvider.swift -// Lottie -// -// Created by Brandon Withrow on 8/5/20. -// Copyright © 2020 YurtvilleProds. All rights reserved. -// - -import CoreGraphics -import CoreText -import Foundation - -// MARK: - AnimationFontProvider - -/// Font provider is a protocol that is used to supply fonts to `LottieAnimationView`. -/// -public protocol AnimationFontProvider { - func fontFor(family: String, size: CGFloat) -> CTFont? -} - -// MARK: - DefaultFontProvider - -/// Default Font provider. -public final class DefaultFontProvider: AnimationFontProvider { - - // MARK: Lifecycle - - public init() { } - - // MARK: Public - - public func fontFor(family: String, size: CGFloat) -> CTFont? { - CTFontCreateWithName(family as CFString, size, nil) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Public/ImageProvider/AnimationImageProvider.swift b/Example/Pods/lottie-ios/Sources/Public/ImageProvider/AnimationImageProvider.swift deleted file mode 100644 index f9358a2..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/ImageProvider/AnimationImageProvider.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// LottieImageProvider.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/25/19. -// - -import CoreGraphics -import Foundation - -/// Image provider is a protocol that is used to supply images to `LottieAnimationView`. -/// -/// Some animations require a reference to an image. The image provider loads and -/// provides those images to the `LottieAnimationView`. Lottie includes a couple of -/// prebuilt Image Providers that supply images from a Bundle, or from a FilePath. -/// -/// Additionally custom Image Providers can be made to load images from a URL, -/// or to Cache images. -public protocol AnimationImageProvider { - func imageForAsset(asset: ImageAsset) -> CGImage? -} diff --git a/Example/Pods/lottie-ios/Sources/Public/Keyframes/Interpolatable.swift b/Example/Pods/lottie-ios/Sources/Public/Keyframes/Interpolatable.swift deleted file mode 100644 index 7c89375..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/Keyframes/Interpolatable.swift +++ /dev/null @@ -1,253 +0,0 @@ -// Created by Cal Stephens on 1/24/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -import CoreGraphics - -// MARK: - Interpolatable - -/// A type that can be interpolated between two values -public protocol Interpolatable: AnyInterpolatable { - /// Interpolates the `self` to the given number by `amount`. - /// - Parameter to: The number to interpolate to. - /// - Parameter amount: The amount to interpolate, - /// relative to 0.0 (self) and 1.0 (to). - /// `amount` can be greater than one and less than zero, - /// and interpolation should not be clamped. - /// - /// ``` - /// let number = 5 - /// let interpolated = number.interpolateTo(10, amount: 0.5) - /// print(interpolated) // 7.5 - /// ``` - /// - /// ``` - /// let number = 5 - /// let interpolated = number.interpolateTo(10, amount: 1.5) - /// print(interpolated) // 12.5 - /// ``` - func interpolate(to: Self, amount: CGFloat) -> Self -} - -// MARK: - SpatialInterpolatable - -/// A type that can be interpolated between two values, -/// additionally using optional `spatialOutTangent` and `spatialInTangent` values. -/// - If your implementation doesn't use the `spatialOutTangent` and `spatialInTangent` -/// parameters, prefer implementing the simpler `Interpolatable` protocol. -public protocol SpatialInterpolatable: AnyInterpolatable { - /// Interpolates the `self` to the given number by `amount`. - /// - Parameter to: The number to interpolate to. - /// - Parameter amount: The amount to interpolate, - /// relative to 0.0 (self) and 1.0 (to). - /// `amount` can be greater than one and less than zero, - /// and interpolation should not be clamped. - func interpolate( - to: Self, - amount: CGFloat, - spatialOutTangent: CGPoint?, - spatialInTangent: CGPoint?) - -> Self -} - -// MARK: - AnyInterpolatable - -/// The base protocol that is implemented by both `Interpolatable` and `SpatialInterpolatable` -/// Types should not directly implement this protocol. -public protocol AnyInterpolatable { - /// Interpolates by calling either `Interpolatable.interpolate` - /// or `SpatialInterpolatable.interpolate`. - /// Should not be implemented or called by consumers. - func _interpolate( - to: Self, - amount: CGFloat, - spatialOutTangent: CGPoint?, - spatialInTangent: CGPoint?) - -> Self -} - -extension Interpolatable { - public func _interpolate( - to: Self, - amount: CGFloat, - spatialOutTangent _: CGPoint?, - spatialInTangent _: CGPoint?) - -> Self - { - interpolate(to: to, amount: amount) - } -} - -extension SpatialInterpolatable { - /// Helper that interpolates this `SpatialInterpolatable` - /// with `nil` spatial in/out tangents - public func interpolate(to: Self, amount: CGFloat) -> Self { - interpolate( - to: to, - amount: amount, - spatialOutTangent: nil, - spatialInTangent: nil) - } - - public func _interpolate( - to: Self, - amount: CGFloat, - spatialOutTangent: CGPoint?, - spatialInTangent: CGPoint?) - -> Self - { - interpolate( - to: to, - amount: amount, - spatialOutTangent: spatialOutTangent, - spatialInTangent: spatialInTangent) - } -} - -// MARK: - Double + Interpolatable - -extension Double: Interpolatable { } - -// MARK: - CGFloat + Interpolatable - -extension CGFloat: Interpolatable { } - -// MARK: - Float + Interpolatable - -extension Float: Interpolatable { } - -extension Interpolatable where Self: BinaryFloatingPoint { - public func interpolate(to: Self, amount: CGFloat) -> Self { - self + ((to - self) * Self(amount)) - } -} - -// MARK: - CGRect + Interpolatable - -extension CGRect: Interpolatable { - public func interpolate(to: CGRect, amount: CGFloat) -> CGRect { - CGRect( - x: origin.x.interpolate(to: to.origin.x, amount: amount), - y: origin.y.interpolate(to: to.origin.y, amount: amount), - width: width.interpolate(to: to.width, amount: amount), - height: height.interpolate(to: to.height, amount: amount)) - } -} - -// MARK: - CGSize + Interpolatable - -extension CGSize: Interpolatable { - public func interpolate(to: CGSize, amount: CGFloat) -> CGSize { - CGSize( - width: width.interpolate(to: to.width, amount: amount), - height: height.interpolate(to: to.height, amount: amount)) - } -} - -// MARK: - CGPoint + SpatialInterpolatable - -extension CGPoint: SpatialInterpolatable { - public func interpolate( - to: CGPoint, - amount: CGFloat, - spatialOutTangent: CGPoint?, - spatialInTangent: CGPoint?) - -> CGPoint - { - guard - let outTan = spatialOutTangent, - let inTan = spatialInTangent - else { - return CGPoint( - x: x.interpolate(to: to.x, amount: amount), - y: y.interpolate(to: to.y, amount: amount)) - } - - let cp1 = self + outTan - let cp2 = to + inTan - return interpolate(to, outTangent: cp1, inTangent: cp2, amount: amount) - } -} - -// MARK: - LottieColor + Interpolatable - -extension LottieColor: Interpolatable { - public func interpolate(to: LottieColor, amount: CGFloat) -> LottieColor { - LottieColor( - r: r.interpolate(to: to.r, amount: amount), - g: g.interpolate(to: to.g, amount: amount), - b: b.interpolate(to: to.b, amount: amount), - a: a.interpolate(to: to.a, amount: amount)) - } -} - -// MARK: - LottieVector1D + Interpolatable - -extension LottieVector1D: Interpolatable { - public func interpolate(to: LottieVector1D, amount: CGFloat) -> LottieVector1D { - value.interpolate(to: to.value, amount: amount).vectorValue - } -} - -// MARK: - LottieVector2D + SpatialInterpolatable - -extension LottieVector2D: SpatialInterpolatable { - public func interpolate( - to: LottieVector2D, - amount: CGFloat, - spatialOutTangent: CGPoint?, - spatialInTangent: CGPoint?) - -> LottieVector2D - { - pointValue.interpolate( - to: to.pointValue, - amount: amount, - spatialOutTangent: spatialOutTangent, - spatialInTangent: spatialInTangent) - .vector2dValue - } -} - -// MARK: - LottieVector3D + SpatialInterpolatable - -extension LottieVector3D: SpatialInterpolatable { - public func interpolate( - to: LottieVector3D, - amount: CGFloat, - spatialOutTangent: CGPoint?, - spatialInTangent: CGPoint?) - -> LottieVector3D - { - if spatialInTangent != nil || spatialOutTangent != nil { - // TODO Support third dimension spatial interpolation - let point = pointValue.interpolate( - to: to.pointValue, - amount: amount, - spatialOutTangent: spatialOutTangent, - spatialInTangent: spatialInTangent) - - return LottieVector3D( - x: point.x, - y: point.y, - z: CGFloat(z.interpolate(to: to.z, amount: amount))) - } - - return LottieVector3D( - x: x.interpolate(to: to.x, amount: amount), - y: y.interpolate(to: to.y, amount: amount), - z: z.interpolate(to: to.z, amount: amount)) - } -} - -// MARK: - Array + Interpolatable, AnyInterpolatable - -extension Array: Interpolatable, AnyInterpolatable where Element: Interpolatable { - public func interpolate(to: [Element], amount: CGFloat) -> [Element] { - LottieLogger.shared.assert( - count == to.count, - "When interpolating Arrays, both array sound have the same element count.") - - return zip(self, to).map { lhs, rhs in - lhs.interpolate(to: rhs, amount: amount) - } - } -} diff --git a/Example/Pods/lottie-ios/Sources/Public/Keyframes/Keyframe.swift b/Example/Pods/lottie-ios/Sources/Public/Keyframes/Keyframe.swift deleted file mode 100644 index 4e63a57..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/Keyframes/Keyframe.swift +++ /dev/null @@ -1,92 +0,0 @@ -// Created by Cal Stephens on 1/24/22. -// Copyright © 2022 Airbnb Inc. All rights reserved. - -// MARK: - Keyframe - -/// A keyframe with a single value, and timing information -/// about when the value should be displayed and how it -/// should be interpolated. -public final class Keyframe { - - // MARK: Lifecycle - - /// Initialize a value-only keyframe with no time data. - public init( - _ value: T, - spatialInTangent: LottieVector3D? = nil, - spatialOutTangent: LottieVector3D? = nil) - { - self.value = value - time = 0 - isHold = true - inTangent = nil - outTangent = nil - self.spatialInTangent = spatialInTangent - self.spatialOutTangent = spatialOutTangent - } - - /// Initialize a keyframe - public init( - value: T, - time: AnimationFrameTime, - isHold: Bool = false, - inTangent: LottieVector2D? = nil, - outTangent: LottieVector2D? = nil, - spatialInTangent: LottieVector3D? = nil, - spatialOutTangent: LottieVector3D? = nil) - { - self.value = value - self.time = time - self.isHold = isHold - self.outTangent = outTangent - self.inTangent = inTangent - self.spatialInTangent = spatialInTangent - self.spatialOutTangent = spatialOutTangent - } - - // MARK: Public - - /// The value of the keyframe - public let value: T - /// The time in frames of the keyframe. - public let time: AnimationFrameTime - /// A hold keyframe freezes interpolation until the next keyframe that is not a hold. - public let isHold: Bool - /// The in tangent for the time interpolation curve. - public let inTangent: LottieVector2D? - /// The out tangent for the time interpolation curve. - public let outTangent: LottieVector2D? - - /// The spatial in tangent of the vector. - public let spatialInTangent: LottieVector3D? - /// The spatial out tangent of the vector. - public let spatialOutTangent: LottieVector3D? -} - -// MARK: Equatable - -extension Keyframe: Equatable where T: Equatable { - public static func == (lhs: Keyframe, rhs: Keyframe) -> Bool { - lhs.value == rhs.value - && lhs.time == rhs.time - && lhs.isHold == rhs.isHold - && lhs.inTangent == rhs.inTangent - && lhs.outTangent == rhs.outTangent - && lhs.spatialInTangent == rhs.spatialOutTangent - && lhs.spatialOutTangent == rhs.spatialOutTangent - } -} - -// MARK: Hashable - -extension Keyframe: Hashable where T: Hashable { - public func hash(into hasher: inout Hasher) { - hasher.combine(value) - hasher.combine(time) - hasher.combine(isHold) - hasher.combine(inTangent) - hasher.combine(outTangent) - hasher.combine(spatialInTangent) - hasher.combine(spatialOutTangent) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Public/Logging/LottieLogger.swift b/Example/Pods/lottie-ios/Sources/Public/Logging/LottieLogger.swift deleted file mode 100644 index cddde2d..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/Logging/LottieLogger.swift +++ /dev/null @@ -1,137 +0,0 @@ -// Created by eric_horacek on 12/9/20. -// Copyright © 2020 Airbnb Inc. All rights reserved. - -// MARK: - LottieLogger - -/// A shared logger that allows consumers to intercept Lottie assertions and warning messages to pipe -/// into their own logging systems. -public final class LottieLogger { - - // MARK: Lifecycle - - public init( - assert: @escaping Assert = { condition, message, file, line in - // If we default to `Swift.assert` directly with `assert: Assert = Swift.assert`, - // the call will unexpectedly not respect the -O flag and will crash in release - // https://github.com/apple/swift/issues/60249 - Swift.assert(condition(), message(), file: file, line: line) - }, - assertionFailure: @escaping AssertionFailure = { message, file, line in - // If we default to `Swift.assertionFailure` directly with - // `assertionFailure: AssertionFailure = Swift.assertionFailure`, - // the call will unexpectedly not respect the -O flag and will crash in release - // https://github.com/apple/swift/issues/60249 - Swift.assertionFailure(message(), file: file, line: line) - }, - warn: @escaping Warn = { message, _, _ in - #if DEBUG - // swiftlint:disable:next no_direct_standard_out_logs - print(message()) - #endif - }, - info: @escaping Info = { message in - #if DEBUG - // swiftlint:disable:next no_direct_standard_out_logs - print(message()) - #endif - }) - { - _assert = assert - _assertionFailure = assertionFailure - _warn = warn - _info = info - } - - // MARK: Public - - /// Logs that an assertion occurred. - public typealias Assert = ( - _ condition: @autoclosure () -> Bool, - _ message: @autoclosure () -> String, - _ fileID: StaticString, - _ line: UInt) - -> Void - - /// Logs that an assertion failure occurred. - public typealias AssertionFailure = ( - _ message: @autoclosure () -> String, - _ fileID: StaticString, - _ line: UInt) - -> Void - - /// Logs a warning message. - public typealias Warn = ( - _ message: @autoclosure () -> String, - _ fileID: StaticString, - _ line: UInt) - -> Void - - /// Prints a purely informational message. - public typealias Info = (_ message: @autoclosure () -> String) -> Void - - /// The shared instance used to log Lottie assertions and warnings. - /// - /// Set this to a new logger instance to intercept assertions and warnings logged by Lottie. - public static var shared = LottieLogger() - - /// Logs that an assertion occurred. - public func assert( - _ condition: @autoclosure () -> Bool, - _ message: @autoclosure () -> String = String(), - fileID: StaticString = #fileID, - line: UInt = #line) - { - _assert(condition(), message(), fileID, line) - } - - /// Logs that an assertion failure occurred. - public func assertionFailure( - _ message: @autoclosure () -> String = String(), - fileID: StaticString = #fileID, - line: UInt = #line) - { - _assertionFailure(message(), fileID, line) - } - - /// Logs a warning message. - public func warn( - _ message: @autoclosure () -> String = String(), - fileID: StaticString = #fileID, - line: UInt = #line) - { - _warn(message(), fileID, line) - } - - /// Logs a purely informational message. - public func info(_ message: @autoclosure () -> String = String()) { - _info(message()) - } - - // MARK: Private - - private let _assert: Assert - private let _assertionFailure: AssertionFailure - private let _warn: Warn - private let _info: Info - -} - -// MARK: - LottieLogger + printToConsole - -extension LottieLogger { - /// A `LottieLogger` instance that always prints to the console (by calling `print`) - /// instead of calling `assert` / `assertionFailure`, which halt execution in debug builds. - public static var printToConsole: LottieLogger { - LottieLogger( - assert: { condition, message, _, _ in - if !condition() { - // swiftlint:disable:next no_direct_standard_out_logs - print(message()) - } - }, - assertionFailure: { message, _, _ in - // swiftlint:disable:next no_direct_standard_out_logs - print(message()) - }) - } -} diff --git a/Example/Pods/lottie-ios/Sources/Public/LottieConfiguration.swift b/Example/Pods/lottie-ios/Sources/Public/LottieConfiguration.swift deleted file mode 100644 index 5059aee..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/LottieConfiguration.swift +++ /dev/null @@ -1,168 +0,0 @@ -// Created by Cal Stephens on 12/13/21. -// Copyright © 2021 Airbnb Inc. All rights reserved. - -import QuartzCore - -// MARK: - LottieConfiguration - -/// Global configuration options for Lottie animations -public struct LottieConfiguration: Hashable { - - // MARK: Lifecycle - - public init( - renderingEngine: RenderingEngineOption = .automatic, - decodingStrategy: DecodingStrategy = .dictionaryBased, - colorSpace: CGColorSpace = CGColorSpaceCreateDeviceRGB()) - { - self.renderingEngine = renderingEngine - self.decodingStrategy = decodingStrategy - self.colorSpace = colorSpace - } - - // MARK: Public - - /// The global configuration of Lottie, - /// which applies to all `LottieAnimationView`s by default. - public static var shared = LottieConfiguration() - - /// The rendering engine implementation to use when displaying an animation - /// - Defaults to `RenderingEngineOption.automatic`, which uses the - /// Core Animation rendering engine for supported animations, and - /// falls back to using the Main Thread rendering engine for - /// animations that use features not supported by the Core Animation engine. - public var renderingEngine: RenderingEngineOption - - /// The decoding implementation to use when parsing an animation JSON file - public var decodingStrategy: DecodingStrategy - - /// The color space to be used for rendering - /// - Defaults to `CGColorSpaceCreateDeviceRGB()` - public var colorSpace: CGColorSpace -} - -// MARK: - RenderingEngineOption - -public enum RenderingEngineOption: Hashable { - /// Uses the Core Animation engine for supported animations, and falls back to using - /// the Main Thread engine for animations that use features not supported by the - /// Core Animation engine. - case automatic - - /// Uses the specified rendering engine - case specific(RenderingEngine) - - // MARK: Public - - /// The Main Thread rendering engine, which supports all Lottie features - /// but runs on the main thread, which comes with some CPU overhead and - /// can cause the animation to play at a low framerate when the CPU is busy. - public static var mainThread: RenderingEngineOption { .specific(.mainThread) } - - /// The Core Animation rendering engine, that animates using Core Animation - /// and has better performance characteristics than the Main Thread engine, - /// but doesn't support all Lottie features. - /// - In general, prefer using `RenderingEngineOption.automatic` over - /// `RenderingEngineOption.coreAnimation`. The Core Animation rendering - /// engine doesn't support all features supported by the Main Thread - /// rendering engine. When using `RenderingEngineOption.automatic`, - /// Lottie will automatically fall back to the Main Thread engine - /// when necessary. - public static var coreAnimation: RenderingEngineOption { .specific(.coreAnimation) } -} - -// MARK: - RenderingEngine - -/// The rendering engine implementation to use when displaying an animation -public enum RenderingEngine: Hashable { - /// The Main Thread rendering engine, which supports all Lottie features - /// but runs on the main thread, which comes with some CPU overhead and - /// can cause the animation to play at a low framerate when the CPU is busy. - case mainThread - - /// The Core Animation rendering engine, that animates using Core Animation - /// and has better performance characteristics than the Main Thread engine, - /// but doesn't support all Lottie features. - case coreAnimation -} - -// MARK: - RenderingEngineOption + RawRepresentable, CustomStringConvertible - -extension RenderingEngineOption: RawRepresentable, CustomStringConvertible { - - // MARK: Lifecycle - - public init?(rawValue: String) { - if rawValue == "Automatic" { - self = .automatic - } else if let engine = RenderingEngine(rawValue: rawValue) { - self = .specific(engine) - } else { - return nil - } - } - - // MARK: Public - - public var rawValue: String { - switch self { - case .automatic: - return "Automatic" - case .specific(let engine): - return engine.rawValue - } - } - - public var description: String { - rawValue - } - -} - -// MARK: - RenderingEngine + RawRepresentable, CustomStringConvertible - -extension RenderingEngine: RawRepresentable, CustomStringConvertible { - - // MARK: Lifecycle - - public init?(rawValue: String) { - switch rawValue { - case "Main Thread": - self = .mainThread - case "Core Animation": - self = .coreAnimation - default: - return nil - } - } - - // MARK: Public - - public var rawValue: String { - switch self { - case .mainThread: - return "Main Thread" - case .coreAnimation: - return "Core Animation" - } - } - - public var description: String { - rawValue - } -} - -// MARK: - DecodingStrategy - -/// How animation files should be decoded -public enum DecodingStrategy: Hashable { - /// Use Codable. This is was the default strategy introduced on Lottie 3, but should be rarely - /// used as it's slower than `dictionaryBased`. Kept here for any possible compatibility issues - /// that may come up, but consider it soft-deprecated. - case legacyCodable - - /// Manually deserialize a dictionary into an Animation. - /// This should be at least 2-3x faster than using Codable and due to that - /// it's the default as of Lottie 4.x. - case dictionaryBased -} diff --git a/Example/Pods/lottie-ios/Sources/Public/Primitives/AnimationTime.swift b/Example/Pods/lottie-ios/Sources/Public/Primitives/AnimationTime.swift deleted file mode 100644 index 2c33e2b..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/Primitives/AnimationTime.swift +++ /dev/null @@ -1,15 +0,0 @@ -// -// AnimationTime.swift -// lottie-swift-iOS -// -// Created by Brandon Withrow on 2/6/19. -// - -import CoreGraphics -import Foundation - -/// Defines animation time in Frames (Seconds * Framerate). -public typealias AnimationFrameTime = CGFloat - -/// Defines animation time by a progress from 0 (beginning of the animation) to 1 (end of the animation) -public typealias AnimationProgressTime = CGFloat diff --git a/Example/Pods/lottie-ios/Sources/Public/Primitives/LottieColor.swift b/Example/Pods/lottie-ios/Sources/Public/Primitives/LottieColor.swift deleted file mode 100644 index 7c2672f..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/Primitives/LottieColor.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// LottieColor.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/4/19. -// - -import Foundation - -// MARK: - ColorFormatDenominator - -public enum ColorFormatDenominator: Hashable { - case One - case OneHundred - case TwoFiftyFive - - var value: Double { - switch self { - case .One: - return 1.0 - case .OneHundred: - return 100.0 - case .TwoFiftyFive: - return 255.0 - } - } -} - -// MARK: - LottieColor - -public struct LottieColor: Hashable { - - public var r: Double - public var g: Double - public var b: Double - public var a: Double - - public init(r: Double, g: Double, b: Double, a: Double, denominator: ColorFormatDenominator = .One) { - self.r = r / denominator.value - self.g = g / denominator.value - self.b = b / denominator.value - self.a = a / denominator.value - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Public/Primitives/Vectors.swift b/Example/Pods/lottie-ios/Sources/Public/Primitives/Vectors.swift deleted file mode 100644 index 1029cca..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/Primitives/Vectors.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// Vectors.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/4/19. -// - -import Foundation - -// MARK: - LottieVector1D - -public struct LottieVector1D: Hashable { - - public init(_ value: Double) { - self.value = value - } - - public let value: Double - -} - -// MARK: - LottieVector3D - -/// A three dimensional vector. -/// These vectors are encoded and decoded from [Double] -public struct LottieVector3D: Hashable { - - public let x: Double - public let y: Double - public let z: Double - - public init(x: Double, y: Double, z: Double) { - self.x = x - self.y = y - self.z = z - } - -} diff --git a/Example/Pods/lottie-ios/Sources/Public/TextProvider/AnimationTextProvider.swift b/Example/Pods/lottie-ios/Sources/Public/TextProvider/AnimationTextProvider.swift deleted file mode 100644 index 4bbbe3d..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/TextProvider/AnimationTextProvider.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// AnimationImageProvider.swift -// Lottie_iOS -// -// Created by Alexandr Goncharov on 07/06/2019. -// - -import Foundation - -// MARK: - AnimationTextProvider - -/// Text provider is a protocol that is used to supply text to `LottieAnimationView`. -public protocol AnimationTextProvider: AnyObject { - func textFor(keypathName: String, sourceText: String) -> String -} - -// MARK: - DictionaryTextProvider - -/// Text provider that simply map values from dictionary -public final class DictionaryTextProvider: AnimationTextProvider { - - // MARK: Lifecycle - - public init(_ values: [String: String]) { - self.values = values - } - - // MARK: Public - - public func textFor(keypathName: String, sourceText: String) -> String { - values[keypathName] ?? sourceText - } - - // MARK: Internal - - let values: [String: String] -} - -// MARK: - DefaultTextProvider - -/// Default text provider. Uses text in the animation file -public final class DefaultTextProvider: AnimationTextProvider { - - // MARK: Lifecycle - - public init() { } - - // MARK: Public - - public func textFor(keypathName _: String, sourceText: String) -> String { - sourceText - } -} diff --git a/Example/Pods/lottie-ios/Sources/Public/iOS/AnimatedButton.swift b/Example/Pods/lottie-ios/Sources/Public/iOS/AnimatedButton.swift deleted file mode 100644 index 987aa5a..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/iOS/AnimatedButton.swift +++ /dev/null @@ -1,86 +0,0 @@ -// -// AnimatedButton.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/4/19. -// - -import Foundation -#if os(iOS) || os(tvOS) || os(watchOS) || targetEnvironment(macCatalyst) -import UIKit -/// An interactive button that plays an animation when pressed. -open class AnimatedButton: AnimatedControl { - - // MARK: Lifecycle - - public override init( - animation: LottieAnimation, - configuration: LottieConfiguration = .shared) - { - super.init(animation: animation, configuration: configuration) - isAccessibilityElement = true - } - - public override init() { - super.init() - isAccessibilityElement = true - } - - required public init?(coder aDecoder: NSCoder) { - super.init(coder: aDecoder) - isAccessibilityElement = true - } - - // MARK: Open - - open override func beginTracking(_ touch: UITouch, with event: UIEvent?) -> Bool { - let _ = super.beginTracking(touch, with: event) - let touchEvent = UIControl.Event.touchDown - if let playrange = rangesForEvents[touchEvent.rawValue] { - animationView.play(fromProgress: playrange.from, toProgress: playrange.to, loopMode: LottieLoopMode.playOnce) - } - return true - } - - open override func endTracking(_ touch: UITouch?, with event: UIEvent?) { - super.endTracking(touch, with: event) - let touchEvent: UIControl.Event - if let touch = touch, bounds.contains(touch.location(in: self)) { - touchEvent = UIControl.Event.touchUpInside - } else { - touchEvent = UIControl.Event.touchUpOutside - } - - if let playrange = rangesForEvents[touchEvent.rawValue] { - animationView.play(fromProgress: playrange.from, toProgress: playrange.to, loopMode: LottieLoopMode.playOnce) - } - } - - // MARK: Public - - public override var accessibilityTraits: UIAccessibilityTraits { - set { super.accessibilityTraits = newValue } - get { super.accessibilityTraits.union(.button) } - } - - /// Sets the play range for the given UIControlEvent. - public func setPlayRange(fromProgress: AnimationProgressTime, toProgress: AnimationProgressTime, event: UIControl.Event) { - rangesForEvents[event.rawValue] = (from: fromProgress, to: toProgress) - } - - /// Sets the play range for the given UIControlEvent. - public func setPlayRange(fromMarker fromName: String, toMarker toName: String, event: UIControl.Event) { - if - let start = animationView.progressTime(forMarker: fromName), - let end = animationView.progressTime(forMarker: toName) - { - rangesForEvents[event.rawValue] = (from: start, to: end) - } - } - - // MARK: Private - - private var rangesForEvents: [UInt : (from: CGFloat, to: CGFloat)] = - [UIControl.Event.touchUpInside.rawValue : (from: 0, to: 1)] -} -#endif diff --git a/Example/Pods/lottie-ios/Sources/Public/iOS/AnimatedControl.swift b/Example/Pods/lottie-ios/Sources/Public/iOS/AnimatedControl.swift deleted file mode 100644 index 4b764df..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/iOS/AnimatedControl.swift +++ /dev/null @@ -1,175 +0,0 @@ -// -// AnimatedControl.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/4/19. -// - -import Foundation -#if os(iOS) || os(tvOS) || os(watchOS) || targetEnvironment(macCatalyst) -import UIKit - -/// Lottie comes prepacked with a two Animated Controls, `AnimatedSwitch` and -/// `AnimatedButton`. Both of these controls are built on top of `AnimatedControl` -/// -/// `AnimatedControl` is a subclass of `UIControl` that provides an interactive -/// mechanism for controlling the visual state of an animation in response to -/// user actions. -/// -/// The `AnimatedControl` will show and hide layers depending on the current -/// `UIControl.State` of the control. -/// -/// Users of `AnimationControl` can set a Layer Name for each `UIControl.State`. -/// When the state is change the `AnimationControl` will change the visibility -/// of its layers. -/// -/// NOTE: Do not initialize directly. This is intended to be subclassed. -open class AnimatedControl: UIControl { - - // MARK: Lifecycle - - // MARK: Initializers - - public init( - animation: LottieAnimation, - configuration: LottieConfiguration = .shared) - { - animationView = LottieAnimationView( - animation: animation, - configuration: configuration) - - super.init(frame: animation.bounds) - commonInit() - } - - public init() { - animationView = LottieAnimationView() - super.init(frame: .zero) - commonInit() - } - - required public init?(coder aDecoder: NSCoder) { - animationView = LottieAnimationView() - super.init(coder: aDecoder) - commonInit() - } - - // MARK: Open - - // MARK: UIControl Overrides - - open override var isEnabled: Bool { - didSet { - updateForState() - } - } - - open override var isSelected: Bool { - didSet { - updateForState() - } - } - - open override var isHighlighted: Bool { - didSet { - updateForState() - } - } - - open override var intrinsicContentSize: CGSize { - animationView.intrinsicContentSize - } - - open override func beginTracking(_ touch: UITouch, with event: UIEvent?) -> Bool { - updateForState() - return super.beginTracking(touch, with: event) - } - - open override func continueTracking(_ touch: UITouch, with event: UIEvent?) -> Bool { - updateForState() - return super.continueTracking(touch, with: event) - } - - open override func endTracking(_ touch: UITouch?, with event: UIEvent?) { - updateForState() - return super.endTracking(touch, with: event) - } - - open override func cancelTracking(with event: UIEvent?) { - updateForState() - super.cancelTracking(with: event) - } - - open func animationDidSet() { } - - // MARK: Public - - /// The animation view in which the animation is rendered. - public let animationView: LottieAnimationView - - /// The animation backing the animated control. - public var animation: LottieAnimation? { - didSet { - animationView.animation = animation - animationView.bounds = animation?.bounds ?? .zero - setNeedsLayout() - updateForState() - animationDidSet() - } - } - - /// The speed of the animation playback. Defaults to 1 - public var animationSpeed: CGFloat { - set { animationView.animationSpeed = newValue } - get { animationView.animationSpeed } - } - - /// Sets which Animation Layer should be visible for the given state. - public func setLayer(named: String, forState: UIControl.State) { - stateMap[forState.rawValue] = named - updateForState() - } - - /// Sets a ValueProvider for the specified keypath - public func setValueProvider(_ valueProvider: AnyValueProvider, keypath: AnimationKeypath) { - animationView.setValueProvider(valueProvider, keypath: keypath) - } - - // MARK: Internal - - var stateMap: [UInt: String] = [:] - - func updateForState() { - guard let animationLayer = animationView.animationLayer else { return } - if - let layerName = stateMap[state.rawValue], - let stateLayer = animationLayer.layer(for: AnimationKeypath(keypath: layerName)) - { - for layer in animationLayer._animationLayers { - layer.isHidden = true - } - stateLayer.isHidden = false - } else { - for layer in animationLayer._animationLayers { - layer.isHidden = false - } - } - } - - // MARK: Private - - private func commonInit() { - animationView.clipsToBounds = false - clipsToBounds = true - animationView.translatesAutoresizingMaskIntoConstraints = false - animationView.backgroundBehavior = .forceFinish - addSubview(animationView) - animationView.contentMode = .scaleAspectFit - animationView.isUserInteractionEnabled = false - animationView.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true - animationView.trailingAnchor.constraint(equalTo: trailingAnchor).isActive = true - animationView.topAnchor.constraint(equalTo: topAnchor).isActive = true - animationView.bottomAnchor.constraint(equalTo: bottomAnchor).isActive = true - } -} -#endif diff --git a/Example/Pods/lottie-ios/Sources/Public/iOS/AnimatedSwitch.swift b/Example/Pods/lottie-ios/Sources/Public/iOS/AnimatedSwitch.swift deleted file mode 100644 index 62546bc..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/iOS/AnimatedSwitch.swift +++ /dev/null @@ -1,233 +0,0 @@ -// -// AnimatedSwitch.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/4/19. -// - -import Foundation -#if os(iOS) || os(tvOS) || os(watchOS) || targetEnvironment(macCatalyst) -import UIKit - -/// An interactive switch with an 'On' and 'Off' state. When the user taps on the -/// switch the state is toggled and the appropriate animation is played. -/// -/// Both the 'On' and 'Off' have an animation play range associated with their state. -open class AnimatedSwitch: AnimatedControl { - - // MARK: Lifecycle - - public override init( - animation: LottieAnimation, - configuration: LottieConfiguration = .shared) - { - /// Generate a haptic generator if available. - #if os(iOS) - if #available(iOS 10.0, *) { - self.hapticGenerator = HapticGenerator() - } else { - hapticGenerator = NullHapticGenerator() - } - #else - hapticGenerator = NullHapticGenerator() - #endif - super.init(animation: animation, configuration: configuration) - isAccessibilityElement = true - updateOnState(isOn: _isOn, animated: false, shouldFireHaptics: false) - } - - public override init() { - /// Generate a haptic generator if available. - #if os(iOS) - if #available(iOS 10.0, *) { - self.hapticGenerator = HapticGenerator() - } else { - hapticGenerator = NullHapticGenerator() - } - #else - hapticGenerator = NullHapticGenerator() - #endif - super.init() - isAccessibilityElement = true - updateOnState(isOn: _isOn, animated: false, shouldFireHaptics: false) - } - - required public init?(coder aDecoder: NSCoder) { - /// Generate a haptic generator if available. - #if os(iOS) - if #available(iOS 10.0, *) { - self.hapticGenerator = HapticGenerator() - } else { - hapticGenerator = NullHapticGenerator() - } - #else - hapticGenerator = NullHapticGenerator() - #endif - super.init(coder: aDecoder) - isAccessibilityElement = true - } - - // MARK: Open - - open override func animationDidSet() { - updateOnState(isOn: _isOn, animated: animateUpdateWhenChangingAnimation, shouldFireHaptics: false) - } - - open override func endTracking(_ touch: UITouch?, with event: UIEvent?) { - super.endTracking(touch, with: event) - updateOnState(isOn: !_isOn, animated: true, shouldFireHaptics: true) - sendActions(for: .valueChanged) - } - - // MARK: Public - - /// Defines what happens when the user taps the switch while an - /// animation is still in flight - public enum CancelBehavior { - case reverse // default - plays the current animation in reverse - case none // does not update the animation when canceled - } - - /// The cancel behavior for the switch. See CancelBehavior for options - public var cancelBehavior: CancelBehavior = .reverse - - /// If `false` the switch will not play the animation when changing between animations. - public var animateUpdateWhenChangingAnimation = true - - public override var accessibilityTraits: UIAccessibilityTraits { - set { super.accessibilityTraits = newValue } - get { super.accessibilityTraits.union(.button) } - } - - /// The current state of the switch. - public var isOn: Bool { - set { - /// This is forwarded to a private variable because the animation needs to be updated without animation when set externally and with animation when set internally. - guard _isOn != newValue else { return } - updateOnState(isOn: newValue, animated: false, shouldFireHaptics: false) - } - get { - _isOn - } - } - - /// Set the state of the switch and specify animation and haptics - public func setIsOn(_ isOn: Bool, animated: Bool, shouldFireHaptics: Bool = true) { - guard isOn != _isOn else { return } - updateOnState(isOn: isOn, animated: animated, shouldFireHaptics: shouldFireHaptics) - } - - /// Sets the play range for the given state. When the switch is toggled, the animation range is played. - public func setProgressForState( - fromProgress: AnimationProgressTime, - toProgress: AnimationProgressTime, - forOnState: Bool) - { - if forOnState { - onStartProgress = fromProgress - onEndProgress = toProgress - } else { - offStartProgress = fromProgress - offEndProgress = toProgress - } - - updateOnState(isOn: _isOn, animated: false, shouldFireHaptics: false) - } - - // MARK: Internal - - // MARK: Animation State - - func updateOnState(isOn: Bool, animated: Bool, shouldFireHaptics: Bool) { - _isOn = isOn - var startProgress = isOn ? onStartProgress : offStartProgress - var endProgress = isOn ? onEndProgress : offEndProgress - let finalProgress = endProgress - - if cancelBehavior == .reverse { - let realtimeProgress = animationView.realtimeAnimationProgress - - let previousStateStart = isOn ? offStartProgress : onStartProgress - let previousStateEnd = isOn ? offEndProgress : onEndProgress - if - realtimeProgress.isInRange( - min(previousStateStart, previousStateEnd), - max(previousStateStart, previousStateEnd)) - { - /// Animation is currently in the previous time range. Reverse the previous play. - startProgress = previousStateEnd - endProgress = previousStateStart - } - } - - updateAccessibilityLabel() - - guard animated == true else { - animationView.currentProgress = finalProgress - return - } - - if shouldFireHaptics { - hapticGenerator.generateImpact() - } - - animationView.play( - fromProgress: startProgress, - toProgress: endProgress, - loopMode: LottieLoopMode.playOnce, - completion: { [weak self] finished in - guard let self = self else { return } - - // For the Main Thread rendering engine, we freeze the animation at the expected final progress - // once the animation is complete. This isn't necessary on the Core Animation engine. - if finished, !(self.animationView.animationLayer is CoreAnimationLayer) { - self.animationView.currentProgress = finalProgress - } - }) - } - - // MARK: Fileprivate - - fileprivate var onStartProgress: CGFloat = 0 - fileprivate var onEndProgress: CGFloat = 1 - fileprivate var offStartProgress: CGFloat = 1 - fileprivate var offEndProgress: CGFloat = 0 - fileprivate var _isOn = false - fileprivate var hapticGenerator: ImpactGenerator - - // MARK: Private - - private func updateAccessibilityLabel() { - accessibilityValue = _isOn ? NSLocalizedString("On", comment: "On") : NSLocalizedString("Off", comment: "Off") - } - -} -#endif - -// MARK: - ImpactGenerator - -protocol ImpactGenerator { - func generateImpact() -} - -// MARK: - NullHapticGenerator - -class NullHapticGenerator: ImpactGenerator { - func generateImpact() { } -} - -#if os(iOS) -@available(iOS 10.0, *) -class HapticGenerator: ImpactGenerator { - - // MARK: Internal - - func generateImpact() { - impact.impactOccurred() - } - - // MARK: Fileprivate - - fileprivate let impact = UIImpactFeedbackGenerator(style: .light) -} -#endif diff --git a/Example/Pods/lottie-ios/Sources/Public/iOS/AnimationSubview.swift b/Example/Pods/lottie-ios/Sources/Public/iOS/AnimationSubview.swift deleted file mode 100644 index bc4df54..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/iOS/AnimationSubview.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// AnimationSubview.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/4/19. -// - -import Foundation -#if os(iOS) || os(tvOS) || os(watchOS) || targetEnvironment(macCatalyst) -import UIKit - -/// A view that can be added to a keypath of an AnimationView -public final class AnimationSubview: UIView { - - var viewLayer: CALayer? { - layer - } - -} -#endif diff --git a/Example/Pods/lottie-ios/Sources/Public/iOS/BundleImageProvider.swift b/Example/Pods/lottie-ios/Sources/Public/iOS/BundleImageProvider.swift deleted file mode 100644 index b452ca9..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/iOS/BundleImageProvider.swift +++ /dev/null @@ -1,89 +0,0 @@ -// -// LottieBundleImageProvider.swift -// lottie-swift -// -// Created by Brandon Withrow on 1/25/19. -// - -import CoreGraphics -import Foundation -#if os(iOS) || os(tvOS) || os(watchOS) || targetEnvironment(macCatalyst) -import UIKit - -/// An `AnimationImageProvider` that provides images by name from a specific bundle. -/// The BundleImageProvider is initialized with a bundle and an optional searchPath. -public class BundleImageProvider: AnimationImageProvider { - - // MARK: Lifecycle - - /// Initializes an image provider with a bundle and an optional subpath. - /// - /// Provides images for an animation from a bundle. Additionally the provider can - /// search a specific subpath for the images. - /// - /// - Parameter bundle: The bundle containing images for the provider. - /// - Parameter searchPath: The subpath is a path within the bundle to search for image assets. - /// - public init(bundle: Bundle, searchPath: String?) { - self.bundle = bundle - self.searchPath = searchPath - } - - // MARK: Public - - public func imageForAsset(asset: ImageAsset) -> CGImage? { - if - let data = Data(imageAsset: asset), - let image = UIImage(data: data) - { - return image.cgImage - } - - let imagePath: String? - /// Try to find the image in the bundle. - if let searchPath = searchPath { - /// Search in the provided search path for the image - var directoryPath = URL(fileURLWithPath: searchPath) - directoryPath.appendPathComponent(asset.directory) - - if let path = bundle.path(forResource: asset.name, ofType: nil, inDirectory: directoryPath.path) { - /// First search for the image in the asset provided sub directory. - imagePath = path - } else if let path = bundle.path(forResource: asset.name, ofType: nil, inDirectory: searchPath) { - /// Try finding the image in the search path. - imagePath = path - } else { - imagePath = bundle.path(forResource: asset.name, ofType: nil) - } - } else { - if let path = bundle.path(forResource: asset.name, ofType: nil, inDirectory: asset.directory) { - /// First search for the image in the asset provided sub directory. - imagePath = path - } else { - /// First search for the image in bundle. - imagePath = bundle.path(forResource: asset.name, ofType: nil) - } - } - - if imagePath == nil { - guard let image = UIImage(named: asset.name, in: bundle, compatibleWith: nil) else { - LottieLogger.shared.warn("Could not find image \"\(asset.name)\" in bundle") - return nil - } - return image.cgImage - } - - guard let foundPath = imagePath, let image = UIImage(contentsOfFile: foundPath) else { - /// No image found. - LottieLogger.shared.warn("Could not find image \"\(asset.name)\" in bundle") - return nil - } - return image.cgImage - } - - // MARK: Internal - - let bundle: Bundle - let searchPath: String? -} -#endif diff --git a/Example/Pods/lottie-ios/Sources/Public/iOS/Compatibility/CompatibleAnimationKeypath.swift b/Example/Pods/lottie-ios/Sources/Public/iOS/Compatibility/CompatibleAnimationKeypath.swift deleted file mode 100644 index 7396355..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/iOS/Compatibility/CompatibleAnimationKeypath.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// CompatibleAnimationKeypath.swift -// Lottie_iOS -// -// Created by Tyler Hedrick on 3/6/19. -// - -import Foundation -#if os(iOS) || os(tvOS) || os(watchOS) || targetEnvironment(macCatalyst) - -/// An Objective-C compatible wrapper around Lottie's AnimationKeypath -@objc -public final class CompatibleAnimationKeypath: NSObject { - - // MARK: Lifecycle - - /// Creates a keypath from a dot separated string. The string is separated by "." - @objc - public init(keypath: String) { - animationKeypath = AnimationKeypath(keypath: keypath) - } - - /// Creates a keypath from a list of strings. - @objc - public init(keys: [String]) { - animationKeypath = AnimationKeypath(keys: keys) - } - - // MARK: Public - - public let animationKeypath: AnimationKeypath -} -#endif diff --git a/Example/Pods/lottie-ios/Sources/Public/iOS/Compatibility/CompatibleAnimationView.swift b/Example/Pods/lottie-ios/Sources/Public/iOS/Compatibility/CompatibleAnimationView.swift deleted file mode 100644 index c8b5774..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/iOS/Compatibility/CompatibleAnimationView.swift +++ /dev/null @@ -1,544 +0,0 @@ -// -// CompatibleAnimationView.swift -// Lottie_iOS -// -// Created by Tyler Hedrick on 3/6/19. -// - -import Foundation -#if os(iOS) || os(tvOS) || os(watchOS) || targetEnvironment(macCatalyst) -import UIKit - -/// An Objective-C compatible wrapper around Lottie's Animation class. -/// Use in tandem with CompatibleAnimationView when using Lottie in Objective-C -@objc -public final class CompatibleAnimation: NSObject { - - // MARK: Lifecycle - - @objc - public init( - name: String, - subdirectory: String? = nil, - bundle: Bundle = Bundle.main) - { - self.name = name - self.subdirectory = subdirectory - self.bundle = bundle - super.init() - } - - // MARK: Internal - - internal var animation: LottieAnimation? { - LottieAnimation.named(name, bundle: bundle, subdirectory: subdirectory) - } - - @objc - static func named(_ name: String) -> CompatibleAnimation { - CompatibleAnimation(name: name) - } - - // MARK: Private - - private let name: String - private let subdirectory: String? - private let bundle: Bundle -} - -/// An Objective-C compatible wrapper around Lottie's RenderingEngineOption enum. Pass in an option -/// to the CompatibleAnimationView initializers to configure the rendering engine for the view. -@objc -public enum CompatibleRenderingEngineOption: Int { - /// Uses the rendering engine specified in LottieConfiguration.shared. - case shared - - /// Uses the library default rendering engine, coreAnimation. - case defaultEngine - - /// Optimizes rendering performance by using the Core Animation rendering engine for animations it - /// can render while falling back to the main thread renderer for all other animations. - case automatic - - /// Only renders animations using the main thread rendering engine. - case mainThread - - /// Only renders animations using the Core Animation rendering engine. Those animations that use - /// features not yet supported on this renderer will not be rendered. - case coreAnimation - - // MARK: Public - - /// Converts a CompatibleRenderingEngineOption to the corresponding LottieConfiguration for - /// internal rendering engine configuration. - public static func generateLottieConfiguration( - _ configuration: CompatibleRenderingEngineOption) - -> LottieConfiguration - { - switch configuration { - case .shared: - return LottieConfiguration.shared - case .defaultEngine: - return LottieConfiguration(renderingEngine: .coreAnimation) - case .automatic: - return LottieConfiguration(renderingEngine: .automatic) - case .mainThread: - return LottieConfiguration(renderingEngine: .mainThread) - case .coreAnimation: - return LottieConfiguration(renderingEngine: .coreAnimation) - } - } -} - -/// An Objective-C compatible version of `LottieBackgroundBehavior`. -@objc -public enum CompatibleBackgroundBehavior: Int { - /// Stop the animation and reset it to the beginning of its current play time. The completion block is called. - case stop - - /// Pause the animation in its current state. The completion block is called. - case pause - - /// Pause the animation and restart it when the application moves to the foreground. - /// The completion block is stored and called when the animation completes. - /// - This is the default when using the Main Thread rendering engine. - case pauseAndRestore - - /// Stops the animation and sets it to the end of its current play time. The completion block is called. - case forceFinish - - /// The animation continues playing in the background. - /// - This is the default when using the Core Animation rendering engine. - /// Playing an animation using the Core Animation engine doesn't come with any CPU overhead, - /// so using `.continuePlaying` avoids the need to stop and then resume the animation - /// (which does come with some CPU overhead). - /// - This mode should not be used with the Main Thread rendering engine. - case continuePlaying -} - -/// An Objective-C compatible wrapper around Lottie's LottieAnimationView. -@objc -public final class CompatibleAnimationView: UIView { - - // MARK: Lifecycle - - /// Initializes a compatible AnimationView with a given compatible animation. Defaults to using - /// the rendering engine specified in LottieConfiguration.shared. - @objc - public convenience init(compatibleAnimation: CompatibleAnimation) { - self.init(compatibleAnimation: compatibleAnimation, compatibleRenderingEngineOption: .shared) - } - - /// Initializes a compatible AnimationView with a given compatible animation and rendering engine - /// configuration. - @objc - public init( - compatibleAnimation: CompatibleAnimation, - compatibleRenderingEngineOption: CompatibleRenderingEngineOption) - { - animationView = LottieAnimationView( - animation: compatibleAnimation.animation, - configuration: CompatibleRenderingEngineOption.generateLottieConfiguration(compatibleRenderingEngineOption)) - self.compatibleAnimation = compatibleAnimation - super.init(frame: .zero) - commonInit() - } - - /// Initializes a compatible AnimationView with the resources asynchronously loaded from a given - /// URL. Defaults to using the rendering engine specified in LottieConfiguration.shared. - @objc - public convenience init(url: URL) { - self.init(url: url, compatibleRenderingEngineOption: .shared) - } - - /// Initializes a compatible AnimationView with the resources asynchronously loaded from a given - /// URL using the given rendering engine configuration. - @objc - public init(url: URL, compatibleRenderingEngineOption: CompatibleRenderingEngineOption) { - animationView = LottieAnimationView( - url: url, - closure: { _ in }, - configuration: CompatibleRenderingEngineOption.generateLottieConfiguration(compatibleRenderingEngineOption)) - super.init(frame: .zero) - commonInit() - } - - /// Initializes a compatible AnimationView from a given Data object specifying the Lottie - /// animation. Defaults to using the rendering engine specified in LottieConfiguration.shared. - @objc - public convenience init(data: Data) { - self.init(data: data, compatibleRenderingEngineOption: .shared) - } - - /// Initializes a compatible AnimationView from a given Data object specifying the Lottie - /// animation using the given rendering engine configuration. - @objc - public init(data: Data, compatibleRenderingEngineOption: CompatibleRenderingEngineOption) { - if let animation = try? LottieAnimation.from(data: data) { - animationView = LottieAnimationView( - animation: animation, - configuration: CompatibleRenderingEngineOption.generateLottieConfiguration(compatibleRenderingEngineOption)) - } else { - animationView = LottieAnimationView( - configuration: CompatibleRenderingEngineOption.generateLottieConfiguration(compatibleRenderingEngineOption)) - } - super.init(frame: .zero) - commonInit() - } - - @objc - public override init(frame: CGRect) { - animationView = LottieAnimationView() - super.init(frame: frame) - commonInit() - } - - required init?(coder _: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - // MARK: Public - - @objc - public var compatibleAnimation: CompatibleAnimation? { - didSet { - animationView.animation = compatibleAnimation?.animation - } - } - - @objc - public var loopAnimationCount: CGFloat = 0 { - didSet { - animationView.loopMode = loopAnimationCount == -1 ? .loop : .repeat(Float(loopAnimationCount)) - } - } - - @objc - public var compatibleDictionaryTextProvider: CompatibleDictionaryTextProvider? { - didSet { - animationView.textProvider = compatibleDictionaryTextProvider?.textProvider ?? DefaultTextProvider() - } - } - - @objc - public override var contentMode: UIView.ContentMode { - set { animationView.contentMode = newValue } - get { animationView.contentMode } - } - - @objc - public var shouldRasterizeWhenIdle: Bool { - set { animationView.shouldRasterizeWhenIdle = newValue } - get { animationView.shouldRasterizeWhenIdle } - } - - @objc - public var currentProgress: CGFloat { - set { animationView.currentProgress = newValue } - get { animationView.currentProgress } - } - - @objc - public var duration: CGFloat { - animationView.animation?.duration ?? 0.0 - } - - @objc - public var currentTime: TimeInterval { - set { animationView.currentTime = newValue } - get { animationView.currentTime } - } - - @objc - public var currentFrame: CGFloat { - set { animationView.currentFrame = newValue } - get { animationView.currentFrame } - } - - @objc - public var realtimeAnimationFrame: CGFloat { - animationView.realtimeAnimationFrame - } - - @objc - public var realtimeAnimationProgress: CGFloat { - animationView.realtimeAnimationProgress - } - - @objc - public var animationSpeed: CGFloat { - set { animationView.animationSpeed = newValue } - get { animationView.animationSpeed } - } - - @objc - public var respectAnimationFrameRate: Bool { - set { animationView.respectAnimationFrameRate = newValue } - get { animationView.respectAnimationFrameRate } - } - - @objc - public var isAnimationPlaying: Bool { - animationView.isAnimationPlaying - } - - @objc - public var backgroundMode: CompatibleBackgroundBehavior { - get { - switch animationView.backgroundBehavior { - case .stop: - return .stop - case .pause: - return .pause - case .pauseAndRestore: - return .pauseAndRestore - case .forceFinish: - return .forceFinish - case .continuePlaying: - return .continuePlaying - } - } - set { - switch newValue { - case .stop: - animationView.backgroundBehavior = .stop - case .pause: - animationView.backgroundBehavior = .pause - case .pauseAndRestore: - animationView.backgroundBehavior = .pauseAndRestore - case .forceFinish: - animationView.backgroundBehavior = .forceFinish - case .continuePlaying: - animationView.backgroundBehavior = .continuePlaying - } - } - } - - @objc - public func play() { - play(completion: nil) - } - - @objc - public func play(completion: ((Bool) -> Void)?) { - animationView.play(completion: completion) - } - - /// Note: When calling this code from Objective-C, the method signature is - /// playFromProgress:toProgress:completion which drops the standard "With" naming convention. - @objc - public func play( - fromProgress: CGFloat, - toProgress: CGFloat, - completion: ((Bool) -> Void)? = nil) - { - animationView.play( - fromProgress: fromProgress, - toProgress: toProgress, - loopMode: nil, - completion: completion) - } - - /// Note: When calling this code from Objective-C, the method signature is - /// playFromFrame:toFrame:completion which drops the standard "With" naming convention. - @objc - public func play( - fromFrame: CGFloat, - toFrame: CGFloat, - completion: ((Bool) -> Void)? = nil) - { - animationView.play( - fromFrame: fromFrame, - toFrame: toFrame, - loopMode: nil, - completion: completion) - } - - /// Note: When calling this code from Objective-C, the method signature is - /// playFromMarker:toMarker:completion which drops the standard "With" naming convention. - @objc - public func play( - fromMarker: String, - toMarker: String, - completion: ((Bool) -> Void)? = nil) - { - animationView.play( - fromMarker: fromMarker, - toMarker: toMarker, - completion: completion) - } - - @objc - public func play( - marker: String, - completion: ((Bool) -> Void)? = nil) - { - animationView.play( - marker: marker, - completion: completion) - } - - @objc - public func stop() { - animationView.stop() - } - - @objc - public func pause() { - animationView.pause() - } - - @objc - public func reloadImages() { - animationView.reloadImages() - } - - @objc - public func forceDisplayUpdate() { - animationView.forceDisplayUpdate() - } - - @objc - public func getValue( - for keypath: CompatibleAnimationKeypath, - atFrame: CGFloat) - -> Any? - { - animationView.getValue( - for: keypath.animationKeypath, - atFrame: atFrame) - } - - @objc - public func logHierarchyKeypaths() { - animationView.logHierarchyKeypaths() - } - - @objc - public func setColorValue(_ color: UIColor, forKeypath keypath: CompatibleAnimationKeypath) { - var red: CGFloat = 0 - var green: CGFloat = 0 - var blue: CGFloat = 0 - var alpha: CGFloat = 0 - - let colorspace = LottieConfiguration.shared.colorSpace - - let convertedColor = color.cgColor.converted(to: colorspace, intent: .defaultIntent, options: nil) - - if let components = convertedColor?.components, components.count == 4 { - red = components[0] - green = components[1] - blue = components[2] - alpha = components[3] - } else { - color.getRed(&red, green: &green, blue: &blue, alpha: &alpha) - } - - let valueProvider = ColorValueProvider(LottieColor(r: Double(red), g: Double(green), b: Double(blue), a: Double(alpha))) - animationView.setValueProvider(valueProvider, keypath: keypath.animationKeypath) - } - - @objc - public func getColorValue(for keypath: CompatibleAnimationKeypath, atFrame: CGFloat) -> UIColor? { - let value = animationView.getValue(for: keypath.animationKeypath, atFrame: atFrame) - guard let colorValue = value as? LottieColor else { - return nil; - } - - return UIColor( - red: CGFloat(colorValue.r), - green: CGFloat(colorValue.g), - blue: CGFloat(colorValue.b), - alpha: CGFloat(colorValue.a)) - } - - @objc - public func addSubview( - _ subview: AnimationSubview, - forLayerAt keypath: CompatibleAnimationKeypath) - { - animationView.addSubview( - subview, - forLayerAt: keypath.animationKeypath) - } - - @objc - public func convert( - rect: CGRect, - toLayerAt keypath: CompatibleAnimationKeypath?) - -> CGRect - { - animationView.convert( - rect, - toLayerAt: keypath?.animationKeypath) ?? .zero - } - - @objc - public func convert( - point: CGPoint, - toLayerAt keypath: CompatibleAnimationKeypath?) - -> CGPoint - { - animationView.convert( - point, - toLayerAt: keypath?.animationKeypath) ?? .zero - } - - @objc - public func progressTime(forMarker named: String) -> CGFloat { - animationView.progressTime(forMarker: named) ?? 0 - } - - @objc - public func frameTime(forMarker named: String) -> CGFloat { - animationView.frameTime(forMarker: named) ?? 0 - } - - @objc - public func durationFrameTime(forMarker named: String) -> CGFloat { - animationView.durationFrameTime(forMarker: named) ?? 0 - } - - // MARK: Private - - private let animationView: LottieAnimationView - - private func commonInit() { - setUpViews() - } - - private func setUpViews() { - animationView.translatesAutoresizingMaskIntoConstraints = false - addSubview(animationView) - animationView.topAnchor.constraint(equalTo: topAnchor).isActive = true - animationView.trailingAnchor.constraint(equalTo: trailingAnchor).isActive = true - animationView.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true - animationView.bottomAnchor.constraint(equalTo: bottomAnchor).isActive = true - } -} - -/// An Objective-C compatible wrapper around Lottie's DictionaryTextProvider. -/// Use in tandem with CompatibleAnimationView to supply text to LottieAnimationView -/// when using Lottie in Objective-C. -@objc -public final class CompatibleDictionaryTextProvider: NSObject { - - // MARK: Lifecycle - - @objc - public init(values: [String: String]) { - self.values = values - super.init() - } - - // MARK: Internal - - internal var textProvider: AnimationTextProvider? { - DictionaryTextProvider(values) - } - - // MARK: Private - - private let values: [String: String] -} -#endif diff --git a/Example/Pods/lottie-ios/Sources/Public/iOS/FilepathImageProvider.swift b/Example/Pods/lottie-ios/Sources/Public/iOS/FilepathImageProvider.swift deleted file mode 100644 index f4d2779..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/iOS/FilepathImageProvider.swift +++ /dev/null @@ -1,59 +0,0 @@ -// -// FilepathImageProvider.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/1/19. -// - -import Foundation -#if os(iOS) || os(tvOS) || os(watchOS) || targetEnvironment(macCatalyst) -import UIKit - -/// Provides an image for a lottie animation from a provided Bundle. -public class FilepathImageProvider: AnimationImageProvider { - - // MARK: Lifecycle - - /// Initializes an image provider with a specific filepath. - /// - /// - Parameter filepath: The absolute filepath containing the images. - /// - public init(filepath: String) { - self.filepath = URL(fileURLWithPath: filepath) - } - - public init(filepath: URL) { - self.filepath = filepath - } - - // MARK: Public - - public func imageForAsset(asset: ImageAsset) -> CGImage? { - if - asset.name.hasPrefix("data:"), - let url = URL(string: asset.name), - let data = try? Data(contentsOf: url), - let image = UIImage(data: data) - { - return image.cgImage - } - - let directPath = filepath.appendingPathComponent(asset.name).path - if FileManager.default.fileExists(atPath: directPath) { - return UIImage(contentsOfFile: directPath)?.cgImage - } - - let pathWithDirectory = filepath.appendingPathComponent(asset.directory).appendingPathComponent(asset.name).path - if FileManager.default.fileExists(atPath: pathWithDirectory) { - return UIImage(contentsOfFile: pathWithDirectory)?.cgImage - } - - LottieLogger.shared.warn("Could not find image \"\(asset.name)\" in bundle") - return nil - } - - // MARK: Internal - - let filepath: URL -} -#endif diff --git a/Example/Pods/lottie-ios/Sources/Public/iOS/LottieAnimationViewBase.swift b/Example/Pods/lottie-ios/Sources/Public/iOS/LottieAnimationViewBase.swift deleted file mode 100644 index 6509a3b..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/iOS/LottieAnimationViewBase.swift +++ /dev/null @@ -1,78 +0,0 @@ -// -// LottieAnimationViewBase.swift -// lottie-swift-iOS -// -// Created by Brandon Withrow on 2/6/19. -// - -#if os(iOS) || os(tvOS) || os(watchOS) || targetEnvironment(macCatalyst) -import UIKit - -/// The base view for `LottieAnimationView` on iOS, tvOS, watchOS, and macCatalyst. -/// -/// Enables the `LottieAnimationView` implementation to be shared across platforms. -open class LottieAnimationViewBase: UIView { - - // MARK: Public - - public override var contentMode: UIView.ContentMode { - didSet { - setNeedsLayout() - } - } - - public override func didMoveToWindow() { - super.didMoveToWindow() - animationMovedToWindow() - } - - public override func layoutSubviews() { - super.layoutSubviews() - layoutAnimation() - } - - // MARK: Internal - - var viewLayer: CALayer? { - layer - } - - var screenScale: CGFloat { - UIScreen.main.scale - } - - func layoutAnimation() { - // Implemented by subclasses. - } - - func animationMovedToWindow() { - // Implemented by subclasses. - } - - func commonInit() { - contentMode = .scaleAspectFit - clipsToBounds = true - NotificationCenter.default.addObserver( - self, - selector: #selector(animationWillEnterForeground), - name: UIApplication.willEnterForegroundNotification, - object: nil) - NotificationCenter.default.addObserver( - self, - selector: #selector(animationWillMoveToBackground), - name: UIApplication.didEnterBackgroundNotification, - object: nil) - } - - @objc - func animationWillMoveToBackground() { - // Implemented by subclasses. - } - - @objc - func animationWillEnterForeground() { - // Implemented by subclasses. - } - -} -#endif diff --git a/Example/Pods/lottie-ios/Sources/Public/iOS/UIColorExtension.swift b/Example/Pods/lottie-ios/Sources/Public/iOS/UIColorExtension.swift deleted file mode 100644 index 006ca24..0000000 --- a/Example/Pods/lottie-ios/Sources/Public/iOS/UIColorExtension.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// UIColorExtension.swift -// lottie-swift -// -// Created by Brandon Withrow on 2/4/19. -// - -import Foundation -#if os(iOS) || os(tvOS) || os(watchOS) || targetEnvironment(macCatalyst) -import UIKit - -extension UIColor { - - public var lottieColorValue: LottieColor { - var r: CGFloat = 0, g: CGFloat = 0, b: CGFloat = 0, a: CGFloat = 0 - getRed(&r, green: &g, blue: &b, alpha: &a) - return LottieColor(r: Double(r), g: Double(g), b: Double(b), a: Double(a)) - } - -} -#endif diff --git a/Example/StylableSwiftUI.xcodeproj/project.pbxproj b/Example/StylableSwiftUI.xcodeproj/project.pbxproj deleted file mode 100644 index 791f6f3..0000000 --- a/Example/StylableSwiftUI.xcodeproj/project.pbxproj +++ /dev/null @@ -1,726 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; - 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; - 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; - 607FACEC1AFB9204008FA782 /* StylistIdentifierTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* StylistIdentifierTests.swift */; }; - 60DEBF35D7A5FF647357B436 /* Pods_StylableSwiftUI_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 382E908B281D1A846E6302BC /* Pods_StylableSwiftUI_Tests.framework */; }; - 8CD3576D32D6169BA9088C6A /* Pods_StylableSwiftUI_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A4FC7D92EC8ED86713D5E08 /* Pods_StylableSwiftUI_Example.framework */; }; - 8F06FCAA243F957D00D52B29 /* StylistTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F06FCA9243F957D00D52B29 /* StylistTests.swift */; }; - 8F5C25972A83AEC800128508 /* ImageCacheTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F5C25962A83AEC800128508 /* ImageCacheTests.swift */; }; - 8F5C25992A83B0DB00128508 /* CacheTestsMedia.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8F5C25982A83B0DB00128508 /* CacheTestsMedia.xcassets */; }; - 8F8F18A026B3FB4E00E83CE4 /* ThemedView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F8F189F26B3FB4E00E83CE4 /* ThemedView.swift */; }; - 8FB7656D28815A9A00857520 /* organism_element_like.json in Resources */ = {isa = PBXBuildFile; fileRef = 8FB7656A28815A9900857520 /* organism_element_like.json */; }; - 8FB7656E28815A9A00857520 /* like.json in Resources */ = {isa = PBXBuildFile; fileRef = 8FB7656B28815A9A00857520 /* like.json */; }; - 8FB7656F28815A9A00857520 /* dark_like.json in Resources */ = {isa = PBXBuildFile; fileRef = 8FB7656C28815A9A00857520 /* dark_like.json */; }; - A00F0FF623CCCE6200DDF587 /* ExampleViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = A00F0FF523CCCE6200DDF587 /* ExampleViews.swift */; }; - A00F0FF823CCD10400DDF587 /* Stylist+create.swift in Sources */ = {isa = PBXBuildFile; fileRef = A00F0FF723CCD10400DDF587 /* Stylist+create.swift */; }; - A021A58323D0C2E5003D57D8 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A021A58223D0C2E5003D57D8 /* SceneDelegate.swift */; }; - A021A58523D1D36F003D57D8 /* PreviewAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A08822D323D0990E000E8834 /* PreviewAssets.xcassets */; }; - A021A58823D1E1D7003D57D8 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A021A58A23D1E1D7003D57D8 /* Localizable.strings */; }; - A021A58E23D1E90D003D57D8 /* StyledListScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A021A58D23D1E90D003D57D8 /* StyledListScreen.swift */; }; - A08DF29C24C46CCE005B7FC2 /* StylistIdentifierMatcherTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A08DF29B24C46CCE005B7FC2 /* StylistIdentifierMatcherTests.swift */; }; - A0927B7C23D73DEB0079B57A /* ImageStyleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0927B7B23D73DEB0079B57A /* ImageStyleTests.swift */; }; - A0B8B62D23D0943C00A07971 /* SearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0B8B62C23D0943C00A07971 /* SearchBar.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 607FACC81AFB9204008FA782 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 607FACCF1AFB9204008FA782; - remoteInfo = SwiftUIStylist; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1AD93FE030BB1B85FE2D83AD /* Pods-SwiftUIStylist_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftUIStylist_Tests.release.xcconfig"; path = "Target Support Files/Pods-SwiftUIStylist_Tests/Pods-SwiftUIStylist_Tests.release.xcconfig"; sourceTree = ""; }; - 31259389E366C487830DA17F /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; - 382E908B281D1A846E6302BC /* Pods_StylableSwiftUI_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_StylableSwiftUI_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 3EF2D1DC079D7462AB115367 /* Pods-SwiftUIStylist_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftUIStylist_Example.debug.xcconfig"; path = "Target Support Files/Pods-SwiftUIStylist_Example/Pods-SwiftUIStylist_Example.debug.xcconfig"; sourceTree = ""; }; - 3F799FC4BB9495A23C2AC125 /* Pods-StylableSwiftUI_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StylableSwiftUI_Tests.release.xcconfig"; path = "Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests.release.xcconfig"; sourceTree = ""; }; - 5A4FC7D92EC8ED86713D5E08 /* Pods_StylableSwiftUI_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_StylableSwiftUI_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 607FACD01AFB9204008FA782 /* StylableSwiftUI_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StylableSwiftUI_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 607FACE51AFB9204008FA782 /* StylableSwiftUI_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StylableSwiftUI_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 607FACEB1AFB9204008FA782 /* StylistIdentifierTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StylistIdentifierTests.swift; sourceTree = ""; }; - 6B7E8EBAAB701E047107E149 /* Pods-StylableSwiftUI_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StylableSwiftUI_Tests.debug.xcconfig"; path = "Target Support Files/Pods-StylableSwiftUI_Tests/Pods-StylableSwiftUI_Tests.debug.xcconfig"; sourceTree = ""; }; - 7382401CAE1383A5CF87691F /* StylableSwiftUI.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = StylableSwiftUI.podspec; path = ../StylableSwiftUI.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 7596EC2279A0F53ADC9CDFE2 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; - 7DCB87A2860E3FA71FCC49EE /* Pods-SwiftUIStylist_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftUIStylist_Tests.debug.xcconfig"; path = "Target Support Files/Pods-SwiftUIStylist_Tests/Pods-SwiftUIStylist_Tests.debug.xcconfig"; sourceTree = ""; }; - 8418D4F9E00D256AAE0306FF /* Pods-SwiftUIStylist_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftUIStylist_Example.release.xcconfig"; path = "Target Support Files/Pods-SwiftUIStylist_Example/Pods-SwiftUIStylist_Example.release.xcconfig"; sourceTree = ""; }; - 8F06FCA9243F957D00D52B29 /* StylistTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StylistTests.swift; sourceTree = ""; }; - 8F5C25962A83AEC800128508 /* ImageCacheTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageCacheTests.swift; sourceTree = ""; }; - 8F5C25982A83B0DB00128508 /* CacheTestsMedia.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = CacheTestsMedia.xcassets; sourceTree = ""; }; - 8F8F189F26B3FB4E00E83CE4 /* ThemedView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemedView.swift; sourceTree = ""; }; - 8FB7656A28815A9900857520 /* organism_element_like.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = organism_element_like.json; sourceTree = ""; }; - 8FB7656B28815A9A00857520 /* like.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = like.json; sourceTree = ""; }; - 8FB7656C28815A9A00857520 /* dark_like.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = dark_like.json; sourceTree = ""; }; - 8FF78A4A288951910083A01D /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; name = .swiftlint.yml; path = ../.swiftlint.yml; sourceTree = ""; }; - A00F0FF523CCCE6200DDF587 /* ExampleViews.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleViews.swift; sourceTree = ""; }; - A00F0FF723CCD10400DDF587 /* Stylist+create.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Stylist+create.swift"; sourceTree = ""; }; - A021A58223D0C2E5003D57D8 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; - A021A58923D1E1D7003D57D8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; - A021A58D23D1E90D003D57D8 /* StyledListScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StyledListScreen.swift; sourceTree = ""; }; - A08822D323D0990E000E8834 /* PreviewAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = PreviewAssets.xcassets; sourceTree = ""; }; - A08DF29B24C46CCE005B7FC2 /* StylistIdentifierMatcherTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StylistIdentifierMatcherTests.swift; sourceTree = ""; }; - A0927B7B23D73DEB0079B57A /* ImageStyleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageStyleTests.swift; sourceTree = ""; }; - A0B8B62C23D0943C00A07971 /* SearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchBar.swift; sourceTree = ""; }; - F120D28AD8B9CBF50FD85738 /* Pods-StylableSwiftUI_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StylableSwiftUI_Example.release.xcconfig"; path = "Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example.release.xcconfig"; sourceTree = ""; }; - FA66A77CFC443763FC519836 /* Pods-StylableSwiftUI_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StylableSwiftUI_Example.debug.xcconfig"; path = "Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example.debug.xcconfig"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 607FACCD1AFB9204008FA782 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 8CD3576D32D6169BA9088C6A /* Pods_StylableSwiftUI_Example.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 607FACE21AFB9204008FA782 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 60DEBF35D7A5FF647357B436 /* Pods_StylableSwiftUI_Tests.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 110F901303844155A816906C /* Frameworks */ = { - isa = PBXGroup; - children = ( - 5A4FC7D92EC8ED86713D5E08 /* Pods_StylableSwiftUI_Example.framework */, - 382E908B281D1A846E6302BC /* Pods_StylableSwiftUI_Tests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 607FACC71AFB9204008FA782 = { - isa = PBXGroup; - children = ( - 607FACF51AFB993E008FA782 /* Podspec Metadata */, - 607FACD21AFB9204008FA782 /* Example for SwiftUIStylist */, - 607FACE81AFB9204008FA782 /* Tests */, - 607FACD11AFB9204008FA782 /* Products */, - A1FF82B7DF43B60D3A00425D /* Pods */, - 110F901303844155A816906C /* Frameworks */, - ); - sourceTree = ""; - }; - 607FACD11AFB9204008FA782 /* Products */ = { - isa = PBXGroup; - children = ( - 607FACD01AFB9204008FA782 /* StylableSwiftUI_Example.app */, - 607FACE51AFB9204008FA782 /* StylableSwiftUI_Tests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 607FACD21AFB9204008FA782 /* Example for SwiftUIStylist */ = { - isa = PBXGroup; - children = ( - 8FB7656928815A8D00857520 /* Animations */, - A021A58C23D1E82B003D57D8 /* Styling */, - A021A58B23D1E7D0003D57D8 /* Views */, - A08822CD23D097FC000E8834 /* Preview Content */, - 607FACD51AFB9204008FA782 /* AppDelegate.swift */, - A021A58223D0C2E5003D57D8 /* SceneDelegate.swift */, - 607FACDC1AFB9204008FA782 /* Images.xcassets */, - 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, - 607FACD31AFB9204008FA782 /* Supporting Files */, - A021A58A23D1E1D7003D57D8 /* Localizable.strings */, - ); - name = "Example for SwiftUIStylist"; - path = StylableSwiftUI; - sourceTree = ""; - }; - 607FACD31AFB9204008FA782 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 607FACD41AFB9204008FA782 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 607FACE81AFB9204008FA782 /* Tests */ = { - isa = PBXGroup; - children = ( - 607FACEB1AFB9204008FA782 /* StylistIdentifierTests.swift */, - A0927B7B23D73DEB0079B57A /* ImageStyleTests.swift */, - 607FACE91AFB9204008FA782 /* Supporting Files */, - 8F06FCA9243F957D00D52B29 /* StylistTests.swift */, - A08DF29B24C46CCE005B7FC2 /* StylistIdentifierMatcherTests.swift */, - 8F5C25962A83AEC800128508 /* ImageCacheTests.swift */, - 8F5C25982A83B0DB00128508 /* CacheTestsMedia.xcassets */, - ); - path = Tests; - sourceTree = ""; - }; - 607FACE91AFB9204008FA782 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 607FACEA1AFB9204008FA782 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { - isa = PBXGroup; - children = ( - 7382401CAE1383A5CF87691F /* StylableSwiftUI.podspec */, - 31259389E366C487830DA17F /* README.md */, - 7596EC2279A0F53ADC9CDFE2 /* LICENSE */, - 8FF78A4A288951910083A01D /* .swiftlint.yml */, - ); - name = "Podspec Metadata"; - sourceTree = ""; - }; - 8FB7656928815A8D00857520 /* Animations */ = { - isa = PBXGroup; - children = ( - 8FB7656B28815A9A00857520 /* like.json */, - 8FB7656A28815A9900857520 /* organism_element_like.json */, - 8FB7656C28815A9A00857520 /* dark_like.json */, - ); - name = Animations; - sourceTree = ""; - }; - A021A58B23D1E7D0003D57D8 /* Views */ = { - isa = PBXGroup; - children = ( - A00F0FF523CCCE6200DDF587 /* ExampleViews.swift */, - A0B8B62C23D0943C00A07971 /* SearchBar.swift */, - A021A58D23D1E90D003D57D8 /* StyledListScreen.swift */, - 8F8F189F26B3FB4E00E83CE4 /* ThemedView.swift */, - ); - name = Views; - sourceTree = ""; - }; - A021A58C23D1E82B003D57D8 /* Styling */ = { - isa = PBXGroup; - children = ( - A00F0FF723CCD10400DDF587 /* Stylist+create.swift */, - ); - name = Styling; - sourceTree = ""; - }; - A08822CD23D097FC000E8834 /* Preview Content */ = { - isa = PBXGroup; - children = ( - A08822D323D0990E000E8834 /* PreviewAssets.xcassets */, - ); - name = "Preview Content"; - sourceTree = ""; - }; - A1FF82B7DF43B60D3A00425D /* Pods */ = { - isa = PBXGroup; - children = ( - 3EF2D1DC079D7462AB115367 /* Pods-SwiftUIStylist_Example.debug.xcconfig */, - 8418D4F9E00D256AAE0306FF /* Pods-SwiftUIStylist_Example.release.xcconfig */, - 7DCB87A2860E3FA71FCC49EE /* Pods-SwiftUIStylist_Tests.debug.xcconfig */, - 1AD93FE030BB1B85FE2D83AD /* Pods-SwiftUIStylist_Tests.release.xcconfig */, - FA66A77CFC443763FC519836 /* Pods-StylableSwiftUI_Example.debug.xcconfig */, - F120D28AD8B9CBF50FD85738 /* Pods-StylableSwiftUI_Example.release.xcconfig */, - 6B7E8EBAAB701E047107E149 /* Pods-StylableSwiftUI_Tests.debug.xcconfig */, - 3F799FC4BB9495A23C2AC125 /* Pods-StylableSwiftUI_Tests.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 607FACCF1AFB9204008FA782 /* StylableSwiftUI_Example */ = { - isa = PBXNativeTarget; - buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "StylableSwiftUI_Example" */; - buildPhases = ( - 754DD341BF53246E87D7E826 /* [CP] Check Pods Manifest.lock */, - 607FACCC1AFB9204008FA782 /* Sources */, - 607FACCD1AFB9204008FA782 /* Frameworks */, - 607FACCE1AFB9204008FA782 /* Resources */, - CFA536D8737DD6D3514A9602 /* [CP] Embed Pods Frameworks */, - 8FF78A49288951230083A01D /* Swiftlint */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = StylableSwiftUI_Example; - productName = SwiftUIStylist; - productReference = 607FACD01AFB9204008FA782 /* StylableSwiftUI_Example.app */; - productType = "com.apple.product-type.application"; - }; - 607FACE41AFB9204008FA782 /* StylableSwiftUI_Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "StylableSwiftUI_Tests" */; - buildPhases = ( - 2C9C5307C0C42B9339DED6FF /* [CP] Check Pods Manifest.lock */, - 607FACE11AFB9204008FA782 /* Sources */, - 607FACE21AFB9204008FA782 /* Frameworks */, - 607FACE31AFB9204008FA782 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 607FACE71AFB9204008FA782 /* PBXTargetDependency */, - ); - name = StylableSwiftUI_Tests; - productName = Tests; - productReference = 607FACE51AFB9204008FA782 /* StylableSwiftUI_Tests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 607FACC81AFB9204008FA782 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 1250; - ORGANIZATIONNAME = CocoaPods; - TargetAttributes = { - 607FACCF1AFB9204008FA782 = { - CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 1130; - }; - 607FACE41AFB9204008FA782 = { - CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 1130; - TestTargetID = 607FACCF1AFB9204008FA782; - }; - }; - }; - buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "StylableSwiftUI" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 607FACC71AFB9204008FA782; - productRefGroup = 607FACD11AFB9204008FA782 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 607FACCF1AFB9204008FA782 /* StylableSwiftUI_Example */, - 607FACE41AFB9204008FA782 /* StylableSwiftUI_Tests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 607FACCE1AFB9204008FA782 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8FB7656D28815A9A00857520 /* organism_element_like.json in Resources */, - A021A58523D1D36F003D57D8 /* PreviewAssets.xcassets in Resources */, - 8FB7656F28815A9A00857520 /* dark_like.json in Resources */, - 8FB7656E28815A9A00857520 /* like.json in Resources */, - A021A58823D1E1D7003D57D8 /* Localizable.strings in Resources */, - 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, - 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 607FACE31AFB9204008FA782 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8F5C25992A83B0DB00128508 /* CacheTestsMedia.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 2C9C5307C0C42B9339DED6FF /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-StylableSwiftUI_Tests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 754DD341BF53246E87D7E826 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-StylableSwiftUI_Example-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 8FF78A49288951230083A01D /* Swiftlint */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = Swiftlint; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Type a script or drag a script file from your workspace to insert its path.\nif which \"${PODS_ROOT}/SwiftLint/swiftlint\" > /dev/null; then\n # Push the current directory up one level so we run this from the \"root\" of the project\n pushd ..\n \"${PODS_ROOT}/SwiftLint/swiftlint\" lint --config .swiftlint.yml\n popd\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; - }; - CFA536D8737DD6D3514A9602 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/StylableSwiftUI/StylableSwiftUI.framework", - "${BUILT_PRODUCTS_DIR}/lottie-ios/Lottie.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/StylableSwiftUI.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Lottie.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-StylableSwiftUI_Example/Pods-StylableSwiftUI_Example-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 607FACCC1AFB9204008FA782 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A021A58E23D1E90D003D57D8 /* StyledListScreen.swift in Sources */, - 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, - A00F0FF823CCD10400DDF587 /* Stylist+create.swift in Sources */, - A0B8B62D23D0943C00A07971 /* SearchBar.swift in Sources */, - A00F0FF623CCCE6200DDF587 /* ExampleViews.swift in Sources */, - 8F8F18A026B3FB4E00E83CE4 /* ThemedView.swift in Sources */, - A021A58323D0C2E5003D57D8 /* SceneDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 607FACE11AFB9204008FA782 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A08DF29C24C46CCE005B7FC2 /* StylistIdentifierMatcherTests.swift in Sources */, - 8F5C25972A83AEC800128508 /* ImageCacheTests.swift in Sources */, - 607FACEC1AFB9204008FA782 /* StylistIdentifierTests.swift in Sources */, - A0927B7C23D73DEB0079B57A /* ImageStyleTests.swift in Sources */, - 8F06FCAA243F957D00D52B29 /* StylistTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 607FACCF1AFB9204008FA782 /* StylableSwiftUI_Example */; - targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { - isa = PBXVariantGroup; - children = ( - 607FACDF1AFB9204008FA782 /* Base */, - ); - name = LaunchScreen.xib; - sourceTree = ""; - }; - A021A58A23D1E1D7003D57D8 /* Localizable.strings */ = { - isa = PBXVariantGroup; - children = ( - A021A58923D1E1D7003D57D8 /* en */, - ); - name = Localizable.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 607FACED1AFB9204008FA782 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 607FACEE1AFB9204008FA782 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 607FACF01AFB9204008FA782 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = FA66A77CFC443763FC519836 /* Pods-StylableSwiftUI_Example.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_ASSET_PATHS = StylableSwiftUI/PreviewAssets.xcassets; - INFOPLIST_FILE = StylableSwiftUI/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MODULE_NAME = ExampleApp; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - 607FACF11AFB9204008FA782 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F120D28AD8B9CBF50FD85738 /* Pods-StylableSwiftUI_Example.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_ASSET_PATHS = StylableSwiftUI/PreviewAssets.xcassets; - INFOPLIST_FILE = StylableSwiftUI/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MODULE_NAME = ExampleApp; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; - 607FACF31AFB9204008FA782 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6B7E8EBAAB701E047107E149 /* Pods-StylableSwiftUI_Tests.debug.xcconfig */; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = Tests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/StylableSwiftUI_Example.app/StylableSwiftUI_Example"; - }; - name = Debug; - }; - 607FACF41AFB9204008FA782 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3F799FC4BB9495A23C2AC125 /* Pods-StylableSwiftUI_Tests.release.xcconfig */; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - "$(inherited)", - ); - INFOPLIST_FILE = Tests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/StylableSwiftUI_Example.app/StylableSwiftUI_Example"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "StylableSwiftUI" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 607FACED1AFB9204008FA782 /* Debug */, - 607FACEE1AFB9204008FA782 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "StylableSwiftUI_Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 607FACF01AFB9204008FA782 /* Debug */, - 607FACF11AFB9204008FA782 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "StylableSwiftUI_Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 607FACF31AFB9204008FA782 /* Debug */, - 607FACF41AFB9204008FA782 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 607FACC81AFB9204008FA782 /* Project object */; -} diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..a647175 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,15 @@ +{ + "originHash" : "69c749a97304adbea33f8bc11d25eee6eccc423228b34379523ca9d2f3dec143", + "pins" : [ + { + "identity" : "lottie-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/airbnb/lottie-ios.git", + "state" : { + "revision" : "769b88d83a42ca8d5572b020c96f47e3690b3796", + "version" : "4.4.3" + } + } + ], + "version" : 3 +} diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..49a2240 --- /dev/null +++ b/Package.swift @@ -0,0 +1,29 @@ +// swift-tools-version: 5.10 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "StylableSwiftUI", + platforms: [ + .iOS(.v15) + ], + products: [ + .library(name: "StylableSwiftUI", targets: ["StylableSwiftUI"]), + .library(name: "StylableSwiftUIAnimated", targets: ["StylableSwiftUIAnimated"]) + ], + dependencies: [ + .package(url: "https://github.com/airbnb/lottie-ios.git", from: "4.4.3")], + targets: [ + .target(name: "StylableSwiftUI"), + .target(name: "StylableSwiftUIAnimated", + dependencies: [ + "StylableSwiftUI", + .product(name: "Lottie", package: "lottie-ios") + ]), + .testTarget( + name: "StylableSwiftUITests", + dependencies: ["StylableSwiftUI", "StylableSwiftUIAnimated"] + ) + ] +) diff --git a/README.md b/README.md index 8af967c..bf9efec 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![CI](https://github.com/design-ops/stylable-swiftUI/workflows/CI/badge.svg?branch=master&event=push) -# SwiftUIStylable +# StylableSwiftUI An attempt to make SwiftUI components stylable by an external type and reusable across apps, based on the principles of Atomic Design (https://bradfrost.com/blog/post/atomic-web-design/). diff --git a/StylableSwiftUI/Classes/Core/DebugStylist.swift b/Sources/StylableSwiftUI/DebugStylist.swift similarity index 99% rename from StylableSwiftUI/Classes/Core/DebugStylist.swift rename to Sources/StylableSwiftUI/DebugStylist.swift index 7ce2d3f..93c77cc 100644 --- a/StylableSwiftUI/Classes/Core/DebugStylist.swift +++ b/Sources/StylableSwiftUI/DebugStylist.swift @@ -1,7 +1,6 @@ // // DebugStylist.swift // - import Foundation import SwiftUI diff --git a/StylableSwiftUI/Classes/Core/ImageCache/ImageCache.swift b/Sources/StylableSwiftUI/ImageCache/ImageCache.swift similarity index 99% rename from StylableSwiftUI/Classes/Core/ImageCache/ImageCache.swift rename to Sources/StylableSwiftUI/ImageCache/ImageCache.swift index bef6d1c..90e1daa 100644 --- a/StylableSwiftUI/Classes/Core/ImageCache/ImageCache.swift +++ b/Sources/StylableSwiftUI/ImageCache/ImageCache.swift @@ -1,7 +1,6 @@ // // ImageCache.swift // - import Foundation typealias ImageName = String diff --git a/StylableSwiftUI/Classes/Core/ImageCache/ImageCacheKey.swift b/Sources/StylableSwiftUI/ImageCache/ImageCacheKey.swift similarity index 99% rename from StylableSwiftUI/Classes/Core/ImageCache/ImageCacheKey.swift rename to Sources/StylableSwiftUI/ImageCache/ImageCacheKey.swift index 84cef7a..cd27f3c 100644 --- a/StylableSwiftUI/Classes/Core/ImageCache/ImageCacheKey.swift +++ b/Sources/StylableSwiftUI/ImageCache/ImageCacheKey.swift @@ -1,7 +1,6 @@ // // ImageCacheKey.swift // - import Foundation struct ImageCacheKey: Hashable { diff --git a/StylableSwiftUI/Classes/Core/Logger.swift b/Sources/StylableSwiftUI/Logger.swift similarity index 85% rename from StylableSwiftUI/Classes/Core/Logger.swift rename to Sources/StylableSwiftUI/Logger.swift index 567d81f..1a1945a 100644 --- a/StylableSwiftUI/Classes/Core/Logger.swift +++ b/Sources/StylableSwiftUI/Logger.swift @@ -4,7 +4,6 @@ // // Created by Kerr Marin Miller on 15/04/2020. // - import Foundation import os @@ -62,23 +61,23 @@ public final class Logger { os_log("%@", log: .default, type: level.osLogType, printString) } - func log(_ items: Any..., separator: String = " ", level: Level = .default) { + public func log(_ items: Any..., separator: String = " ", level: Level = .default) { self.log(items, separator: separator, level: level) } - func info(_ items: Any, separator: String = " ") { + public func info(_ items: Any, separator: String = " ") { self.log(items, separator: separator, level: .info) } - func debug(_ items: Any, separator: String = " ") { + public func debug(_ items: Any, separator: String = " ") { self.log(items, separator: separator, level: .debug) } - func error(_ items: Any, separator: String = " ") { + public func error(_ items: Any, separator: String = " ") { self.log(items, separator: separator, level: .error) } - func fault(_ items: Any, separator: String = " ") { + public func fault(_ items: Any, separator: String = " ") { self.log(items, separator: separator, level: .fault) } } diff --git a/StylableSwiftUI/Classes/Core/StylableGroup.swift b/Sources/StylableSwiftUI/StylableGroup.swift similarity index 99% rename from StylableSwiftUI/Classes/Core/StylableGroup.swift rename to Sources/StylableSwiftUI/StylableGroup.swift index bb2b2bb..d6c35a2 100644 --- a/StylableSwiftUI/Classes/Core/StylableGroup.swift +++ b/Sources/StylableSwiftUI/StylableGroup.swift @@ -1,7 +1,6 @@ // // StylableGroup.swift // - import Foundation import SwiftUI diff --git a/StylableSwiftUI/Classes/Core/StylableImage.swift b/Sources/StylableSwiftUI/StylableImage.swift similarity index 99% rename from StylableSwiftUI/Classes/Core/StylableImage.swift rename to Sources/StylableSwiftUI/StylableImage.swift index abfa39d..fe76961 100644 --- a/StylableSwiftUI/Classes/Core/StylableImage.swift +++ b/Sources/StylableSwiftUI/StylableImage.swift @@ -1,9 +1,9 @@ // // StylableImage.swift // - import Foundation import SwiftUI + import UIKit public struct StylableImage: View { @@ -86,7 +86,7 @@ extension Image { } } -extension StylistIdentifier { +public extension StylistIdentifier { /// All the possible names for a image based on this identifier func potentialImageNames(separator: String = StylableImage.defaultSeparator, theme: Theme? = nil) -> AnySequence { diff --git a/StylableSwiftUI/Classes/Core/StylableView.swift b/Sources/StylableSwiftUI/StylableView.swift similarity index 99% rename from StylableSwiftUI/Classes/Core/StylableView.swift rename to Sources/StylableSwiftUI/StylableView.swift index 3eed4e6..76b15cc 100644 --- a/StylableSwiftUI/Classes/Core/StylableView.swift +++ b/Sources/StylableSwiftUI/StylableView.swift @@ -1,7 +1,6 @@ // // StylableView.swift // - import Foundation import SwiftUI diff --git a/StylableSwiftUI/Classes/Core/Stylist.swift b/Sources/StylableSwiftUI/Stylist.swift similarity index 99% rename from StylableSwiftUI/Classes/Core/Stylist.swift rename to Sources/StylableSwiftUI/Stylist.swift index e077ef6..9f1c64d 100644 --- a/StylableSwiftUI/Classes/Core/Stylist.swift +++ b/Sources/StylableSwiftUI/Stylist.swift @@ -1,12 +1,13 @@ // // Stylist.swift // - import Foundation import SwiftUI + import UIKit + @available(iOS 13.0.0, *) public struct Style { public typealias StyleApplyFunction = (Stylable) -> AnyView @@ -184,7 +185,7 @@ public struct StyleBuilder { } #else @available(iOS 13.0.0, *) -@_functionBuilder +@resultBuilder public struct StyleBuilder { public static func buildBlock(_ styles: StyleContainer...) -> [Style] { diff --git a/StylableSwiftUI/Classes/Core/StylistIdentifier.swift b/Sources/StylableSwiftUI/StylistIdentifier.swift similarity index 87% rename from StylableSwiftUI/Classes/Core/StylistIdentifier.swift rename to Sources/StylableSwiftUI/StylistIdentifier.swift index 61921dd..e6898d4 100644 --- a/StylableSwiftUI/Classes/Core/StylistIdentifier.swift +++ b/Sources/StylableSwiftUI/StylistIdentifier.swift @@ -1,7 +1,6 @@ // // StylistIdentifier.swift // - import Foundation /// Identifies a section which can be styled @@ -32,10 +31,15 @@ import Foundation public struct StylistIdentifier: Equatable, Hashable { /// Given the identifier `header/searchBar/title` then `title` is the token - let token: String + public let token: String /// Given the identifier `header/searchBar/title` then the components are `[ "header", "searchBar" ]` - let path: Path + public let path: Path + + public init(token: String, path: Path) { + self.token = token + self.path = path + } } extension StylistIdentifier: LosslessStringConvertible { @@ -76,9 +80,9 @@ extension StylistIdentifier: ExpressibleByStringLiteral { // MARK: - Component -extension StylistIdentifier { +public extension StylistIdentifier { - public struct Path: CustomStringConvertible, LosslessStringConvertible, ExpressibleByStringLiteral, Equatable, Hashable { + struct Path: CustomStringConvertible, LosslessStringConvertible, ExpressibleByStringLiteral, Equatable, Hashable { let components: [Component] @@ -105,12 +109,12 @@ extension StylistIdentifier { var isEmpty: Bool { self.components.isEmpty } - func component(at index: Int) -> Component? { + public func component(at index: Int) -> Component? { guard index >= 0 && index < self.components.count else { return nil } return self.components[index] } - func within(_ path: Path?) -> Path { + public func within(_ path: Path?) -> Path { guard let path = path, !path.isEmpty else { return self } var components = self.components @@ -122,7 +126,7 @@ extension StylistIdentifier { static let empty = Path(components: []) } - struct Component: CustomStringConvertible, Equatable, Hashable { + struct Component: CustomStringConvertible, Equatable, Hashable { let value: String let variant: String? @@ -131,7 +135,7 @@ extension StylistIdentifier { self.variant = variant } - init(_ string: String) { + public init(_ string: String) { // Split on [ // lhs: store as value // rhs: trim trailing ] and store as variant @@ -151,7 +155,7 @@ extension StylistIdentifier { self.variant = variant } - var description: String { + public var description: String { self.value + (self.variant.map { "[" + $0 + "]" } ?? "") } } @@ -159,20 +163,20 @@ extension StylistIdentifier { extension StylistIdentifier.Component: ExpressibleByStringLiteral { - init(stringLiteral value: String) { + public init(stringLiteral value: String) { self.init(value) } } // MARK: - Cheeky DSL -extension StylistIdentifier { +public extension StylistIdentifier { /// Create an identifier representing `self` inside `path` /// /// i.e. `"close".within("button") == 'button/close'` /// - public func within(_ path: Path?) -> StylistIdentifier { + func within(_ path: Path?) -> StylistIdentifier { StylistIdentifier(token: self.token, path: self.path.within(path)) } } diff --git a/StylableSwiftUI/Classes/Core/StylistIdentifierMatcher.swift b/Sources/StylableSwiftUI/StylistIdentifierMatcher.swift similarity index 99% rename from StylableSwiftUI/Classes/Core/StylistIdentifierMatcher.swift rename to Sources/StylableSwiftUI/StylistIdentifierMatcher.swift index f20c765..1d9895d 100644 --- a/StylableSwiftUI/Classes/Core/StylistIdentifierMatcher.swift +++ b/Sources/StylableSwiftUI/StylistIdentifierMatcher.swift @@ -4,7 +4,6 @@ // // Created by Sam Dean on 189/07/2020. // - import Foundation typealias MatcherScore = Int diff --git a/StylableSwiftUI/Classes/Core/Theme.swift b/Sources/StylableSwiftUI/Theme.swift similarity index 99% rename from StylableSwiftUI/Classes/Core/Theme.swift rename to Sources/StylableSwiftUI/Theme.swift index 2727eb4..738d76e 100644 --- a/StylableSwiftUI/Classes/Core/Theme.swift +++ b/Sources/StylableSwiftUI/Theme.swift @@ -4,7 +4,6 @@ // // Created by Kerr Marin Miller on 16/07/2021. // - import Foundation public struct Theme: Equatable, Hashable { diff --git a/StylableSwiftUI/Classes/Core/ThemedStylistIdentifier.swift b/Sources/StylableSwiftUI/ThemedStylistIdentifier.swift similarity index 99% rename from StylableSwiftUI/Classes/Core/ThemedStylistIdentifier.swift rename to Sources/StylableSwiftUI/ThemedStylistIdentifier.swift index b3535ee..1937e3e 100644 --- a/StylableSwiftUI/Classes/Core/ThemedStylistIdentifier.swift +++ b/Sources/StylableSwiftUI/ThemedStylistIdentifier.swift @@ -4,7 +4,6 @@ // // Created by Kerr Marin Miller on 05/08/2021. // - import Foundation public struct ThemedStylistIdentifier: Equatable, Hashable { diff --git a/StylableSwiftUI/Classes/Core/UIKit/Stylist+UIKit.swift b/Sources/StylableSwiftUI/UIKit/Stylist+UIKit.swift similarity index 99% rename from StylableSwiftUI/Classes/Core/UIKit/Stylist+UIKit.swift rename to Sources/StylableSwiftUI/UIKit/Stylist+UIKit.swift index 8827b0c..2faf15a 100644 --- a/StylableSwiftUI/Classes/Core/UIKit/Stylist+UIKit.swift +++ b/Sources/StylableSwiftUI/UIKit/Stylist+UIKit.swift @@ -4,9 +4,9 @@ // // Created by Kerr Marin Miller on 01/09/2020. // - import UIKit + public enum TextCase { case none case uppercase @@ -77,3 +77,4 @@ extension Array where Iterator.Element == StylistProperty { }.first } } + diff --git a/StylableSwiftUI/Classes/Core/UIKit/UIKitStyleContainer.swift b/Sources/StylableSwiftUI/UIKit/UIKitStyleContainer.swift similarity index 99% rename from StylableSwiftUI/Classes/Core/UIKit/UIKitStyleContainer.swift rename to Sources/StylableSwiftUI/UIKit/UIKitStyleContainer.swift index d208504..213de3c 100644 --- a/StylableSwiftUI/Classes/Core/UIKit/UIKitStyleContainer.swift +++ b/Sources/StylableSwiftUI/UIKit/UIKitStyleContainer.swift @@ -4,9 +4,10 @@ // // Created by Kerr Marin Miller on 03/09/2020. // - import Foundation +import UIKit + public final class UIKitStyleContainer { private var registeredProperties: [ThemedStylistIdentifier: [StylistProperty]] private let stylist: Stylist diff --git a/StylableSwiftUI/Classes/Core/View+style.swift b/Sources/StylableSwiftUI/View+style.swift similarity index 99% rename from StylableSwiftUI/Classes/Core/View+style.swift rename to Sources/StylableSwiftUI/View+style.swift index fde8e75..c538d83 100644 --- a/StylableSwiftUI/Classes/Core/View+style.swift +++ b/Sources/StylableSwiftUI/View+style.swift @@ -1,7 +1,6 @@ // // View+style.swift // - import Foundation import SwiftUI diff --git a/StylableSwiftUI/Classes/Core/WithStyleIdentifier.swift b/Sources/StylableSwiftUI/WithStyleIdentifier.swift similarity index 100% rename from StylableSwiftUI/Classes/Core/WithStyleIdentifier.swift rename to Sources/StylableSwiftUI/WithStyleIdentifier.swift diff --git a/StylableSwiftUI/Classes/Animated/AnimatedView.swift b/Sources/StylableSwiftUIAnimated/AnimatedView.swift similarity index 100% rename from StylableSwiftUI/Classes/Animated/AnimatedView.swift rename to Sources/StylableSwiftUIAnimated/AnimatedView.swift diff --git a/StylableSwiftUI/Classes/Animated/StylableAnimatedView.swift b/Sources/StylableSwiftUIAnimated/StylableAnimatedView.swift similarity index 99% rename from StylableSwiftUI/Classes/Animated/StylableAnimatedView.swift rename to Sources/StylableSwiftUIAnimated/StylableAnimatedView.swift index 5a4f801..7f819c8 100644 --- a/StylableSwiftUI/Classes/Animated/StylableAnimatedView.swift +++ b/Sources/StylableSwiftUIAnimated/StylableAnimatedView.swift @@ -1,6 +1,7 @@ import Foundation import SwiftUI import Lottie +import StylableSwiftUI public struct StylableAnimatedView: View { public static let defaultSeparator = "_" diff --git a/StylableSwiftUI.podspec b/StylableSwiftUI.podspec index 9ebcea4..1b7771e 100644 --- a/StylableSwiftUI.podspec +++ b/StylableSwiftUI.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'StylableSwiftUI' s.version = '4.0.0' - s.summary = 'StylableSwiftUI - Style SwifTUI apps and libraries' + s.summary = 'StylableSwiftUI - Style SwiftUI apps and libraries' s.description = <<-DESC Easily tag a SwiftUI library so it can be styled by multiple apps. DESC @@ -12,17 +12,17 @@ Easily tag a SwiftUI library so it can be styled by multiple apps. s.source = { :git => 'https://github.com/design-ops/stylable-swiftUI.git', :tag => "v#{s.version}" } s.swift_version = '5.8' - s.ios.deployment_target = '14.0' + s.ios.deployment_target = '15.0' s.default_subspec = 'Core' s.subspec 'Core' do |sub| - sub.source_files = 'StylableSwiftUI/Classes/Core/**/*{.swift}' + sub.source_files = 'Sources/StylableSwiftUI/**/*{.swift}' end s.subspec 'Animated' do |sub| sub.dependency 'StylableSwiftUI/Core' - sub.source_files = 'StylableSwiftUI/Classes/Animated/**/*{.swift}' + sub.source_files = 'Sources/StylableSwiftUIAnimated/Animated/**/*{.swift}' sub.dependency 'lottie-ios' end diff --git a/StylableSwiftUI.xcodeproj/project.pbxproj b/StylableSwiftUI.xcodeproj/project.pbxproj new file mode 100644 index 0000000..0212bb0 --- /dev/null +++ b/StylableSwiftUI.xcodeproj/project.pbxproj @@ -0,0 +1,684 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 1682B51D2C175C3D00D73706 /* Lottie in Frameworks */ = {isa = PBXBuildFile; productRef = 1682B51C2C175C3D00D73706 /* Lottie */; }; + 8FACB8972C2F0D44009EE5AD /* ImageCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB8742C2F0D44009EE5AD /* ImageCache.swift */; }; + 8FACB8982C2F0D44009EE5AD /* ImageCacheKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB8752C2F0D44009EE5AD /* ImageCacheKey.swift */; }; + 8FACB8992C2F0D44009EE5AD /* Stylist+UIKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB8772C2F0D44009EE5AD /* Stylist+UIKit.swift */; }; + 8FACB89A2C2F0D44009EE5AD /* UIKitStyleContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB8782C2F0D44009EE5AD /* UIKitStyleContainer.swift */; }; + 8FACB89B2C2F0D44009EE5AD /* DebugStylist.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB87A2C2F0D44009EE5AD /* DebugStylist.swift */; }; + 8FACB89C2C2F0D44009EE5AD /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB87B2C2F0D44009EE5AD /* Logger.swift */; }; + 8FACB89D2C2F0D44009EE5AD /* StylableGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB87C2C2F0D44009EE5AD /* StylableGroup.swift */; }; + 8FACB89E2C2F0D44009EE5AD /* StylableImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB87D2C2F0D44009EE5AD /* StylableImage.swift */; }; + 8FACB89F2C2F0D44009EE5AD /* StylableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB87E2C2F0D44009EE5AD /* StylableView.swift */; }; + 8FACB8A02C2F0D44009EE5AD /* Stylist.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB87F2C2F0D44009EE5AD /* Stylist.swift */; }; + 8FACB8A12C2F0D44009EE5AD /* StylistIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB8802C2F0D44009EE5AD /* StylistIdentifier.swift */; }; + 8FACB8A22C2F0D44009EE5AD /* StylistIdentifierMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB8812C2F0D44009EE5AD /* StylistIdentifierMatcher.swift */; }; + 8FACB8A32C2F0D44009EE5AD /* Theme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB8822C2F0D44009EE5AD /* Theme.swift */; }; + 8FACB8A42C2F0D44009EE5AD /* ThemedStylistIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB8832C2F0D44009EE5AD /* ThemedStylistIdentifier.swift */; }; + 8FACB8A52C2F0D44009EE5AD /* View+style.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB8842C2F0D44009EE5AD /* View+style.swift */; }; + 8FACB8A62C2F0D44009EE5AD /* WithStyleIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB8852C2F0D44009EE5AD /* WithStyleIdentifier.swift */; }; + 8FACB8A72C2F0D44009EE5AD /* AnimatedView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB8872C2F0D44009EE5AD /* AnimatedView.swift */; }; + 8FACB8A82C2F0D44009EE5AD /* StylableAnimatedView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB8882C2F0D44009EE5AD /* StylableAnimatedView.swift */; }; + 8FACB8B42C2F0DF0009EE5AD /* StylableSwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1682B4DE2C1759A700D73706 /* StylableSwiftUI.framework */; platformFilter = ios; }; + 8FACB8BA2C2F0E12009EE5AD /* CacheTestsMedia.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8FACB86B2C2F0D44009EE5AD /* CacheTestsMedia.xcassets */; }; + 8FACB8BB2C2F0E12009EE5AD /* StylistIdentifierTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB86F2C2F0D44009EE5AD /* StylistIdentifierTests.swift */; }; + 8FACB8BC2C2F0E12009EE5AD /* ImageStyleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB86D2C2F0D44009EE5AD /* ImageStyleTests.swift */; }; + 8FACB8BD2C2F0E12009EE5AD /* StylistTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB8702C2F0D44009EE5AD /* StylistTests.swift */; }; + 8FACB8BE2C2F0E12009EE5AD /* StylistIdentifierMatcherTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB86E2C2F0D44009EE5AD /* StylistIdentifierMatcherTests.swift */; }; + 8FACB8BF2C2F0E12009EE5AD /* ImageCacheTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FACB86C2C2F0D44009EE5AD /* ImageCacheTests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 8FACB8B52C2F0DF0009EE5AD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 1682B4D52C1759A700D73706 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 1682B4DD2C1759A700D73706; + remoteInfo = StylableSwiftUI; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 1682B4DE2C1759A700D73706 /* StylableSwiftUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = StylableSwiftUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8FACB8692C2F0D44009EE5AD /* Gemfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Gemfile; sourceTree = ""; }; + 8FACB86A2C2F0D44009EE5AD /* NDS.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = NDS.md; sourceTree = ""; }; + 8FACB86B2C2F0D44009EE5AD /* CacheTestsMedia.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = CacheTestsMedia.xcassets; sourceTree = ""; }; + 8FACB86C2C2F0D44009EE5AD /* ImageCacheTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageCacheTests.swift; sourceTree = ""; }; + 8FACB86D2C2F0D44009EE5AD /* ImageStyleTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageStyleTests.swift; sourceTree = ""; }; + 8FACB86E2C2F0D44009EE5AD /* StylistIdentifierMatcherTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StylistIdentifierMatcherTests.swift; sourceTree = ""; }; + 8FACB86F2C2F0D44009EE5AD /* StylistIdentifierTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StylistIdentifierTests.swift; sourceTree = ""; }; + 8FACB8702C2F0D44009EE5AD /* StylistTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StylistTests.swift; sourceTree = ""; }; + 8FACB8722C2F0D44009EE5AD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 8FACB8742C2F0D44009EE5AD /* ImageCache.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageCache.swift; sourceTree = ""; }; + 8FACB8752C2F0D44009EE5AD /* ImageCacheKey.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageCacheKey.swift; sourceTree = ""; }; + 8FACB8772C2F0D44009EE5AD /* Stylist+UIKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Stylist+UIKit.swift"; sourceTree = ""; }; + 8FACB8782C2F0D44009EE5AD /* UIKitStyleContainer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIKitStyleContainer.swift; sourceTree = ""; }; + 8FACB87A2C2F0D44009EE5AD /* DebugStylist.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DebugStylist.swift; sourceTree = ""; }; + 8FACB87B2C2F0D44009EE5AD /* Logger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = ""; }; + 8FACB87C2C2F0D44009EE5AD /* StylableGroup.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StylableGroup.swift; sourceTree = ""; }; + 8FACB87D2C2F0D44009EE5AD /* StylableImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StylableImage.swift; sourceTree = ""; }; + 8FACB87E2C2F0D44009EE5AD /* StylableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StylableView.swift; sourceTree = ""; }; + 8FACB87F2C2F0D44009EE5AD /* Stylist.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Stylist.swift; sourceTree = ""; }; + 8FACB8802C2F0D44009EE5AD /* StylistIdentifier.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StylistIdentifier.swift; sourceTree = ""; }; + 8FACB8812C2F0D44009EE5AD /* StylistIdentifierMatcher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StylistIdentifierMatcher.swift; sourceTree = ""; }; + 8FACB8822C2F0D44009EE5AD /* Theme.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Theme.swift; sourceTree = ""; }; + 8FACB8832C2F0D44009EE5AD /* ThemedStylistIdentifier.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThemedStylistIdentifier.swift; sourceTree = ""; }; + 8FACB8842C2F0D44009EE5AD /* View+style.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "View+style.swift"; sourceTree = ""; }; + 8FACB8852C2F0D44009EE5AD /* WithStyleIdentifier.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WithStyleIdentifier.swift; sourceTree = ""; }; + 8FACB8872C2F0D44009EE5AD /* AnimatedView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimatedView.swift; sourceTree = ""; }; + 8FACB8882C2F0D44009EE5AD /* StylableAnimatedView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StylableAnimatedView.swift; sourceTree = ""; }; + 8FACB88B2C2F0D44009EE5AD /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + 8FACB88C2C2F0D44009EE5AD /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + 8FACB88D2C2F0D44009EE5AD /* Package.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; + 8FACB8B02C2F0DF0009EE5AD /* StylableSwiftUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StylableSwiftUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 8FACB8C02C2F0FF1009EE5AD /* StylableSwiftUI.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = StylableSwiftUI.xctestplan; sourceTree = ""; }; + 8FACB8D12C2F11B1009EE5AD /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .swiftlint.yml; sourceTree = ""; }; + 8FACB8D22C2F11B5009EE5AD /* StylableSwiftUI.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = StylableSwiftUI.podspec; sourceTree = ""; }; + 8FACB8D32C2F1B60009EE5AD /* unittestall.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = unittestall.yml; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1682B4DB2C1759A700D73706 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1682B51D2C175C3D00D73706 /* Lottie in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8FACB8AD2C2F0DF0009EE5AD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8FACB8B42C2F0DF0009EE5AD /* StylableSwiftUI.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1682B4D42C1759A700D73706 = { + isa = PBXGroup; + children = ( + 8FACB8D52C2F1B60009EE5AD /* .github */, + 8FACB8692C2F0D44009EE5AD /* Gemfile */, + 8FACB88B2C2F0D44009EE5AD /* LICENSE */, + 8FACB86A2C2F0D44009EE5AD /* NDS.md */, + 8FACB8D22C2F11B5009EE5AD /* StylableSwiftUI.podspec */, + 8FACB8D12C2F11B1009EE5AD /* .swiftlint.yml */, + 8FACB88D2C2F0D44009EE5AD /* Package.swift */, + 8FACB88C2C2F0D44009EE5AD /* README.md */, + 8FACB88A2C2F0D44009EE5AD /* Sources */, + 8FACB8732C2F0D44009EE5AD /* Tests */, + 1682B4DF2C1759A700D73706 /* Products */, + ); + sourceTree = ""; + }; + 1682B4DF2C1759A700D73706 /* Products */ = { + isa = PBXGroup; + children = ( + 1682B4DE2C1759A700D73706 /* StylableSwiftUI.framework */, + 8FACB8B02C2F0DF0009EE5AD /* StylableSwiftUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 8FACB8712C2F0D44009EE5AD /* StylableSwiftUITests */ = { + isa = PBXGroup; + children = ( + 8FACB86B2C2F0D44009EE5AD /* CacheTestsMedia.xcassets */, + 8FACB86C2C2F0D44009EE5AD /* ImageCacheTests.swift */, + 8FACB86D2C2F0D44009EE5AD /* ImageStyleTests.swift */, + 8FACB86E2C2F0D44009EE5AD /* StylistIdentifierMatcherTests.swift */, + 8FACB86F2C2F0D44009EE5AD /* StylistIdentifierTests.swift */, + 8FACB8702C2F0D44009EE5AD /* StylistTests.swift */, + ); + path = StylableSwiftUITests; + sourceTree = ""; + }; + 8FACB8732C2F0D44009EE5AD /* Tests */ = { + isa = PBXGroup; + children = ( + 8FACB8C02C2F0FF1009EE5AD /* StylableSwiftUI.xctestplan */, + 8FACB8712C2F0D44009EE5AD /* StylableSwiftUITests */, + 8FACB8722C2F0D44009EE5AD /* Info.plist */, + ); + path = Tests; + sourceTree = ""; + }; + 8FACB8762C2F0D44009EE5AD /* ImageCache */ = { + isa = PBXGroup; + children = ( + 8FACB8742C2F0D44009EE5AD /* ImageCache.swift */, + 8FACB8752C2F0D44009EE5AD /* ImageCacheKey.swift */, + ); + path = ImageCache; + sourceTree = ""; + }; + 8FACB8792C2F0D44009EE5AD /* UIKit */ = { + isa = PBXGroup; + children = ( + 8FACB8772C2F0D44009EE5AD /* Stylist+UIKit.swift */, + 8FACB8782C2F0D44009EE5AD /* UIKitStyleContainer.swift */, + ); + path = UIKit; + sourceTree = ""; + }; + 8FACB8862C2F0D44009EE5AD /* StylableSwiftUI */ = { + isa = PBXGroup; + children = ( + 8FACB8762C2F0D44009EE5AD /* ImageCache */, + 8FACB8792C2F0D44009EE5AD /* UIKit */, + 8FACB87A2C2F0D44009EE5AD /* DebugStylist.swift */, + 8FACB87B2C2F0D44009EE5AD /* Logger.swift */, + 8FACB87C2C2F0D44009EE5AD /* StylableGroup.swift */, + 8FACB87D2C2F0D44009EE5AD /* StylableImage.swift */, + 8FACB87E2C2F0D44009EE5AD /* StylableView.swift */, + 8FACB87F2C2F0D44009EE5AD /* Stylist.swift */, + 8FACB8802C2F0D44009EE5AD /* StylistIdentifier.swift */, + 8FACB8812C2F0D44009EE5AD /* StylistIdentifierMatcher.swift */, + 8FACB8822C2F0D44009EE5AD /* Theme.swift */, + 8FACB8832C2F0D44009EE5AD /* ThemedStylistIdentifier.swift */, + 8FACB8842C2F0D44009EE5AD /* View+style.swift */, + 8FACB8852C2F0D44009EE5AD /* WithStyleIdentifier.swift */, + ); + path = StylableSwiftUI; + sourceTree = ""; + }; + 8FACB8892C2F0D44009EE5AD /* StylableSwiftUIAnimated */ = { + isa = PBXGroup; + children = ( + 8FACB8872C2F0D44009EE5AD /* AnimatedView.swift */, + 8FACB8882C2F0D44009EE5AD /* StylableAnimatedView.swift */, + ); + path = StylableSwiftUIAnimated; + sourceTree = ""; + }; + 8FACB88A2C2F0D44009EE5AD /* Sources */ = { + isa = PBXGroup; + children = ( + 8FACB8862C2F0D44009EE5AD /* StylableSwiftUI */, + 8FACB8892C2F0D44009EE5AD /* StylableSwiftUIAnimated */, + ); + path = Sources; + sourceTree = ""; + }; + 8FACB8D42C2F1B60009EE5AD /* workflows */ = { + isa = PBXGroup; + children = ( + 8FACB8D32C2F1B60009EE5AD /* unittestall.yml */, + ); + path = workflows; + sourceTree = ""; + }; + 8FACB8D52C2F1B60009EE5AD /* .github */ = { + isa = PBXGroup; + children = ( + 8FACB8D42C2F1B60009EE5AD /* workflows */, + ); + path = .github; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 1682B4D92C1759A700D73706 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 1682B4DD2C1759A700D73706 /* StylableSwiftUI */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1682B4E72C1759A700D73706 /* Build configuration list for PBXNativeTarget "StylableSwiftUI" */; + buildPhases = ( + 1682B4D92C1759A700D73706 /* Headers */, + 1682B4DA2C1759A700D73706 /* Sources */, + 1682B4DB2C1759A700D73706 /* Frameworks */, + 1682B4DC2C1759A700D73706 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = StylableSwiftUI; + packageProductDependencies = ( + 1682B51C2C175C3D00D73706 /* Lottie */, + ); + productName = StylableSwiftUI; + productReference = 1682B4DE2C1759A700D73706 /* StylableSwiftUI.framework */; + productType = "com.apple.product-type.framework"; + }; + 8FACB8AF2C2F0DF0009EE5AD /* StylableSwiftUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8FACB8B72C2F0DF0009EE5AD /* Build configuration list for PBXNativeTarget "StylableSwiftUITests" */; + buildPhases = ( + 8FACB8AC2C2F0DF0009EE5AD /* Sources */, + 8FACB8AD2C2F0DF0009EE5AD /* Frameworks */, + 8FACB8AE2C2F0DF0009EE5AD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 8FACB8B62C2F0DF0009EE5AD /* PBXTargetDependency */, + ); + name = StylableSwiftUITests; + productName = StylableSwiftUITests; + productReference = 8FACB8B02C2F0DF0009EE5AD /* StylableSwiftUITests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 1682B4D52C1759A700D73706 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1530; + LastUpgradeCheck = 1540; + TargetAttributes = { + 1682B4DD2C1759A700D73706 = { + CreatedOnToolsVersion = 15.4; + LastSwiftMigration = 1530; + }; + 8FACB8AF2C2F0DF0009EE5AD = { + CreatedOnToolsVersion = 15.3; + }; + }; + }; + buildConfigurationList = 1682B4D82C1759A700D73706 /* Build configuration list for PBXProject "StylableSwiftUI" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 1682B4D42C1759A700D73706; + packageReferences = ( + 1682B51B2C175C3D00D73706 /* XCRemoteSwiftPackageReference "lottie-ios" */, + ); + productRefGroup = 1682B4DF2C1759A700D73706 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1682B4DD2C1759A700D73706 /* StylableSwiftUI */, + 8FACB8AF2C2F0DF0009EE5AD /* StylableSwiftUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 1682B4DC2C1759A700D73706 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8FACB8AE2C2F0DF0009EE5AD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8FACB8BA2C2F0E12009EE5AD /* CacheTestsMedia.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1682B4DA2C1759A700D73706 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8FACB89B2C2F0D44009EE5AD /* DebugStylist.swift in Sources */, + 8FACB8A72C2F0D44009EE5AD /* AnimatedView.swift in Sources */, + 8FACB8A12C2F0D44009EE5AD /* StylistIdentifier.swift in Sources */, + 8FACB89C2C2F0D44009EE5AD /* Logger.swift in Sources */, + 8FACB8982C2F0D44009EE5AD /* ImageCacheKey.swift in Sources */, + 8FACB8972C2F0D44009EE5AD /* ImageCache.swift in Sources */, + 8FACB8A22C2F0D44009EE5AD /* StylistIdentifierMatcher.swift in Sources */, + 8FACB8A42C2F0D44009EE5AD /* ThemedStylistIdentifier.swift in Sources */, + 8FACB8A82C2F0D44009EE5AD /* StylableAnimatedView.swift in Sources */, + 8FACB8992C2F0D44009EE5AD /* Stylist+UIKit.swift in Sources */, + 8FACB8A62C2F0D44009EE5AD /* WithStyleIdentifier.swift in Sources */, + 8FACB89A2C2F0D44009EE5AD /* UIKitStyleContainer.swift in Sources */, + 8FACB8A32C2F0D44009EE5AD /* Theme.swift in Sources */, + 8FACB89D2C2F0D44009EE5AD /* StylableGroup.swift in Sources */, + 8FACB89E2C2F0D44009EE5AD /* StylableImage.swift in Sources */, + 8FACB89F2C2F0D44009EE5AD /* StylableView.swift in Sources */, + 8FACB8A02C2F0D44009EE5AD /* Stylist.swift in Sources */, + 8FACB8A52C2F0D44009EE5AD /* View+style.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8FACB8AC2C2F0DF0009EE5AD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8FACB8BB2C2F0E12009EE5AD /* StylistIdentifierTests.swift in Sources */, + 8FACB8BC2C2F0E12009EE5AD /* ImageStyleTests.swift in Sources */, + 8FACB8BD2C2F0E12009EE5AD /* StylistTests.swift in Sources */, + 8FACB8BE2C2F0E12009EE5AD /* StylistIdentifierMatcherTests.swift in Sources */, + 8FACB8BF2C2F0E12009EE5AD /* ImageCacheTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 8FACB8B62C2F0DF0009EE5AD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + platformFilter = ios; + target = 1682B4DD2C1759A700D73706 /* StylableSwiftUI */; + targetProxy = 8FACB8B52C2F0DF0009EE5AD /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 1682B4E52C1759A700D73706 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.5; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 1682B4E62C1759A700D73706 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.5; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 1682B4E82C1759A700D73706 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = fr.lvm.StylableSwiftUI; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_INSTALL_OBJC_HEADER = NO; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Debug; + }; + 1682B4E92C1759A700D73706 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = fr.lvm.StylableSwiftUI; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_INSTALL_OBJC_HEADER = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Release; + }; + 8FACB8B82C2F0DF0009EE5AD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = Z8KUB3T25A; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.4; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.design-ops.StylableSwiftUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Debug; + }; + 8FACB8B92C2F0DF0009EE5AD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = Z8KUB3T25A; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.4; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.design-ops.StylableSwiftUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1682B4D82C1759A700D73706 /* Build configuration list for PBXProject "StylableSwiftUI" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1682B4E52C1759A700D73706 /* Debug */, + 1682B4E62C1759A700D73706 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1682B4E72C1759A700D73706 /* Build configuration list for PBXNativeTarget "StylableSwiftUI" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1682B4E82C1759A700D73706 /* Debug */, + 1682B4E92C1759A700D73706 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8FACB8B72C2F0DF0009EE5AD /* Build configuration list for PBXNativeTarget "StylableSwiftUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8FACB8B82C2F0DF0009EE5AD /* Debug */, + 8FACB8B92C2F0DF0009EE5AD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 1682B51B2C175C3D00D73706 /* XCRemoteSwiftPackageReference "lottie-ios" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/airbnb/lottie-ios.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 4.4.3; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 1682B51C2C175C3D00D73706 /* Lottie */ = { + isa = XCSwiftPackageProductDependency; + package = 1682B51B2C175C3D00D73706 /* XCRemoteSwiftPackageReference "lottie-ios" */; + productName = Lottie; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 1682B4D52C1759A700D73706 /* Project object */; +} diff --git a/StylableSwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/StylableSwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/StylableSwiftUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/StylableSwiftUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/StylableSwiftUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/StylableSwiftUI.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/StylableSwiftUI.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/StylableSwiftUI.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..372c77d --- /dev/null +++ b/StylableSwiftUI.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,15 @@ +{ + "originHash" : "0271592b24e5dc1185a09e3f2d980d55521827815d397c9bce8e63d502a51e84", + "pins" : [ + { + "identity" : "lottie-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/airbnb/lottie-ios.git", + "state" : { + "revision" : "769b88d83a42ca8d5572b020c96f47e3690b3796", + "version" : "4.4.3" + } + } + ], + "version" : 3 +} diff --git a/StylableSwiftUI.xcodeproj/xcshareddata/xcschemes/StylableSwiftUI.xcscheme b/StylableSwiftUI.xcodeproj/xcshareddata/xcschemes/StylableSwiftUI.xcscheme new file mode 100644 index 0000000..eb79eb8 --- /dev/null +++ b/StylableSwiftUI.xcodeproj/xcshareddata/xcschemes/StylableSwiftUI.xcscheme @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/StylableSwiftUI.xcworkspace/contents.xcworkspacedata b/StylableSwiftUI.xcworkspace/contents.xcworkspacedata similarity index 75% rename from Example/StylableSwiftUI.xcworkspace/contents.xcworkspacedata rename to StylableSwiftUI.xcworkspace/contents.xcworkspacedata index aa03e23..93ff6da 100644 --- a/Example/StylableSwiftUI.xcworkspace/contents.xcworkspacedata +++ b/StylableSwiftUI.xcworkspace/contents.xcworkspacedata @@ -5,6 +5,6 @@ location = "group:StylableSwiftUI.xcodeproj"> + location = "group:Demo/StylableSwiftUI-Demo.xcodeproj"> diff --git a/StylableSwiftUI.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/StylableSwiftUI.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/StylableSwiftUI.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/StylableSwiftUI.xcworkspace/xcshareddata/swiftpm/Package.resolved b/StylableSwiftUI.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..372c77d --- /dev/null +++ b/StylableSwiftUI.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,15 @@ +{ + "originHash" : "0271592b24e5dc1185a09e3f2d980d55521827815d397c9bce8e63d502a51e84", + "pins" : [ + { + "identity" : "lottie-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/airbnb/lottie-ios.git", + "state" : { + "revision" : "769b88d83a42ca8d5572b020c96f47e3690b3796", + "version" : "4.4.3" + } + } + ], + "version" : 3 +} diff --git a/StylableSwiftUI/Assets/.gitkeep b/StylableSwiftUI/Assets/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/StylableSwiftUI/Classes/.gitkeep b/StylableSwiftUI/Classes/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/Example/Tests/Info.plist b/Tests/Info.plist similarity index 100% rename from Example/Tests/Info.plist rename to Tests/Info.plist diff --git a/Tests/StylableSwiftUI.xctestplan b/Tests/StylableSwiftUI.xctestplan new file mode 100644 index 0000000..5588433 --- /dev/null +++ b/Tests/StylableSwiftUI.xctestplan @@ -0,0 +1,24 @@ +{ + "configurations" : [ + { + "id" : "DC7F256F-CD7A-4489-8C2C-25AB999A95CA", + "name" : "Test Scheme Action", + "options" : { + + } + } + ], + "defaultOptions" : { + "codeCoverage" : false + }, + "testTargets" : [ + { + "target" : { + "containerPath" : "container:StylableSwiftUI.xcodeproj", + "identifier" : "8FACB8AF2C2F0DF0009EE5AD", + "name" : "StylableSwiftUITests" + } + } + ], + "version" : 1 +} diff --git a/Example/Tests/CacheTestsMedia.xcassets/Contents.json b/Tests/StylableSwiftUITests/CacheTestsMedia.xcassets/Contents.json similarity index 100% rename from Example/Tests/CacheTestsMedia.xcassets/Contents.json rename to Tests/StylableSwiftUITests/CacheTestsMedia.xcassets/Contents.json diff --git a/Example/Tests/CacheTestsMedia.xcassets/dark_home_header[selected]_searchBar[deselected]_label.imageset/001-loupe.png b/Tests/StylableSwiftUITests/CacheTestsMedia.xcassets/dark_home_header[selected]_searchBar[deselected]_label.imageset/001-loupe.png similarity index 100% rename from Example/Tests/CacheTestsMedia.xcassets/dark_home_header[selected]_searchBar[deselected]_label.imageset/001-loupe.png rename to Tests/StylableSwiftUITests/CacheTestsMedia.xcassets/dark_home_header[selected]_searchBar[deselected]_label.imageset/001-loupe.png diff --git a/Example/Tests/CacheTestsMedia.xcassets/dark_home_header[selected]_searchBar[deselected]_label.imageset/Contents.json b/Tests/StylableSwiftUITests/CacheTestsMedia.xcassets/dark_home_header[selected]_searchBar[deselected]_label.imageset/Contents.json similarity index 100% rename from Example/Tests/CacheTestsMedia.xcassets/dark_home_header[selected]_searchBar[deselected]_label.imageset/Contents.json rename to Tests/StylableSwiftUITests/CacheTestsMedia.xcassets/dark_home_header[selected]_searchBar[deselected]_label.imageset/Contents.json diff --git a/Example/Tests/CacheTestsMedia.xcassets/dark_home_searchBar[deselected]_label.imageset/002-ui.png b/Tests/StylableSwiftUITests/CacheTestsMedia.xcassets/dark_home_searchBar[deselected]_label.imageset/002-ui.png similarity index 100% rename from Example/Tests/CacheTestsMedia.xcassets/dark_home_searchBar[deselected]_label.imageset/002-ui.png rename to Tests/StylableSwiftUITests/CacheTestsMedia.xcassets/dark_home_searchBar[deselected]_label.imageset/002-ui.png diff --git a/Example/Tests/CacheTestsMedia.xcassets/dark_home_searchBar[deselected]_label.imageset/Contents.json b/Tests/StylableSwiftUITests/CacheTestsMedia.xcassets/dark_home_searchBar[deselected]_label.imageset/Contents.json similarity index 100% rename from Example/Tests/CacheTestsMedia.xcassets/dark_home_searchBar[deselected]_label.imageset/Contents.json rename to Tests/StylableSwiftUITests/CacheTestsMedia.xcassets/dark_home_searchBar[deselected]_label.imageset/Contents.json diff --git a/Example/Tests/CacheTestsMedia.xcassets/dark_label.imageset/003-cancel.png b/Tests/StylableSwiftUITests/CacheTestsMedia.xcassets/dark_label.imageset/003-cancel.png similarity index 100% rename from Example/Tests/CacheTestsMedia.xcassets/dark_label.imageset/003-cancel.png rename to Tests/StylableSwiftUITests/CacheTestsMedia.xcassets/dark_label.imageset/003-cancel.png diff --git a/Example/Tests/CacheTestsMedia.xcassets/dark_label.imageset/Contents.json b/Tests/StylableSwiftUITests/CacheTestsMedia.xcassets/dark_label.imageset/Contents.json similarity index 100% rename from Example/Tests/CacheTestsMedia.xcassets/dark_label.imageset/Contents.json rename to Tests/StylableSwiftUITests/CacheTestsMedia.xcassets/dark_label.imageset/Contents.json diff --git a/Example/Tests/ImageCacheTests.swift b/Tests/StylableSwiftUITests/ImageCacheTests.swift similarity index 100% rename from Example/Tests/ImageCacheTests.swift rename to Tests/StylableSwiftUITests/ImageCacheTests.swift diff --git a/Example/Tests/ImageStyleTests.swift b/Tests/StylableSwiftUITests/ImageStyleTests.swift similarity index 100% rename from Example/Tests/ImageStyleTests.swift rename to Tests/StylableSwiftUITests/ImageStyleTests.swift diff --git a/Example/Tests/StylistIdentifierMatcherTests.swift b/Tests/StylableSwiftUITests/StylistIdentifierMatcherTests.swift similarity index 100% rename from Example/Tests/StylistIdentifierMatcherTests.swift rename to Tests/StylableSwiftUITests/StylistIdentifierMatcherTests.swift diff --git a/Example/Tests/StylistIdentifierTests.swift b/Tests/StylableSwiftUITests/StylistIdentifierTests.swift similarity index 100% rename from Example/Tests/StylistIdentifierTests.swift rename to Tests/StylableSwiftUITests/StylistIdentifierTests.swift diff --git a/Example/Tests/StylistTests.swift b/Tests/StylableSwiftUITests/StylistTests.swift similarity index 100% rename from Example/Tests/StylistTests.swift rename to Tests/StylableSwiftUITests/StylistTests.swift