lottie-ios 4.6.0 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/.github/workflows/main.yml +15 -12
  2. package/.github/workflows/stale_issues.yml +1 -1
  3. package/Lottie.xcodeproj/project.pbxproj +50 -2
  4. package/Lottie.xcworkspace/xcuserdata/cal.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  5. package/README.md +1 -1
  6. package/Sources/Private/CoreAnimation/Animations/GradientAnimations.swift +33 -2
  7. package/Sources/Private/CoreAnimation/Layers/BaseAnimationLayer.swift +14 -1
  8. package/Sources/Private/CoreAnimation/Layers/BaseCompositionLayer.swift +7 -0
  9. package/Sources/Private/CoreAnimation/Layers/ShapeLayer.swift +4 -4
  10. package/Sources/Private/EmbeddedLibraries/EpoxyCore/Logging/EpoxyLogger.swift +5 -2
  11. package/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/EpoxyModelProperty.swift +4 -4
  12. package/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/EpoxyModeled.swift +1 -1
  13. package/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/ErasedContentProviding.swift +5 -5
  14. package/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/ViewDifferentiatorProviding.swift +1 -1
  15. package/Sources/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/WillDisplayProviding.swift +2 -2
  16. package/Sources/Private/EmbeddedLibraries/EpoxyCore/README.md +1 -1
  17. package/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxySwiftUIIntrinsicContentSizeInvalidator.swift +1 -12
  18. package/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxySwiftUILayoutMargins.swift +1 -12
  19. package/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxyableView+SwiftUIView.swift +0 -2
  20. package/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/MeasuringViewRepresentable.swift +1 -2
  21. package/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/SwiftUIMeasurementContainer.swift +0 -2
  22. package/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/SwiftUIView.swift +0 -2
  23. package/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/UIView+SwiftUIView.swift +0 -2
  24. package/Sources/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/UIViewConfiguringSwiftUIView.swift +0 -2
  25. package/Sources/Private/EmbeddedLibraries/EpoxyCore/Views/ViewType.swift +3 -4
  26. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive+BackingConfiguration.swift +21 -29
  27. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive+Deprecated.swift +23 -0
  28. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive+Helpers.swift +4 -5
  29. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive+MemoryFile.swift +59 -39
  30. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive+Progress.swift +1 -1
  31. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive+Reading.swift +14 -6
  32. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive+ReadingDeprecated.swift +1 -1
  33. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive+Writing.swift +37 -34
  34. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive+WritingDeprecated.swift +1 -1
  35. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive+ZIP64.swift +1 -1
  36. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Archive.swift +34 -30
  37. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Data+Compression.swift +5 -5
  38. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Data+CompressionDeprecated.swift +1 -1
  39. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Data+Serialization.swift +6 -8
  40. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Date+ZIP.swift +101 -0
  41. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Entry+Serialization.swift +1 -1
  42. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Entry+ZIP64.swift +15 -19
  43. package/Sources/Private/EmbeddedLibraries/ZipFoundation/Entry.swift +299 -8
  44. package/Sources/Private/EmbeddedLibraries/ZipFoundation/FileManager+ZIP.swift +128 -90
  45. package/Sources/Private/EmbeddedLibraries/ZipFoundation/FileManager+ZIPDeprecated.swift +28 -0
  46. package/Sources/Private/EmbeddedLibraries/ZipFoundation/README.md +1 -1
  47. package/Sources/Private/EmbeddedLibraries/ZipFoundation/URL+ZIP.swift +2 -2
  48. package/Sources/Private/MainThread/LayerContainers/CompLayers/ShapeCompositionLayer.swift +3 -1
  49. package/Sources/Private/MainThread/LayerContainers/Utility/CoreTextRenderLayer.swift +32 -6
  50. package/Sources/Private/MainThread/NodeRenderSystem/Extensions/ItemsExtension.swift +40 -2
  51. package/Sources/Private/MainThread/NodeRenderSystem/Nodes/RenderContainers/GroupNode.swift +3 -1
  52. package/Sources/Private/Model/DotLottie/DotLottieUtils.swift +6 -1
  53. package/Sources/Private/Model/Extensions/Bundle.swift +10 -3
  54. package/Sources/Private/Model/Text/Font.swift +9 -1
  55. package/Sources/Private/Model/Text/TextDocument.swift +18 -1
  56. package/Sources/Public/Animation/LottieAnimationLayer.swift +51 -30
  57. package/Sources/Public/Animation/LottieAnimationView.swift +26 -6
  58. package/Sources/Public/Animation/LottieView.swift +7 -0
  59. package/Sources/Public/Configuration/ReducedMotionOption.swift +10 -0
  60. package/Sources/Public/DynamicProperties/ValueProviders/GradientValueProvider.swift +1 -1
  61. package/Sources/Public/iOS/Compatibility/CompatibleAnimationView.swift +15 -0
  62. package/Sources/Public/iOS/Compatibility/CompatibleFontProvider.swift +41 -0
  63. package/Sources/Public/iOS/Compatibility/CompatibleImageProvider.swift +43 -0
  64. package/Version.xcconfig +2 -2
  65. package/lottie-ios.podspec +1 -1
  66. package/package.json +1 -1
  67. package/.claude/settings.local.json +0 -10
  68. package/Lottie.xcodeproj/project.xcworkspace/xcuserdata/cal_stephens.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  69. package/Lottie.xcworkspace/xcuserdata/cal_stephens.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  70. package/Lottie.xcworkspace/xcuserdata/cal_stephens.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -40
  71. /package/Lottie.xcodeproj/xcuserdata/{cal_stephens.xcuserdatad → cal.xcuserdatad}/xcschemes/xcschememanagement.plist +0 -0
@@ -6,6 +6,9 @@ on:
6
6
  pull_request:
7
7
  branches: [ master ]
8
8
 
9
+ permissions:
10
+ contents: read
11
+
9
12
  jobs:
10
13
  build-package:
11
14
  name: "Build Package"
@@ -17,7 +20,7 @@ jobs:
17
20
  - '16.4' # Swift 6.1
18
21
  - '26.1.1' # Swift 6.2
19
22
  steps:
20
- - uses: actions/checkout@v4
23
+ - uses: actions/checkout@v6
21
24
  - uses: ./.github/actions/setup
22
25
  with:
23
26
  xcode: ${{ matrix.xcode }}
@@ -29,7 +32,7 @@ jobs:
29
32
  name: "Build Example App"
30
33
  runs-on: macos-15
31
34
  steps:
32
- - uses: actions/checkout@v4
35
+ - uses: actions/checkout@v6
33
36
  - uses: ./.github/actions/setup
34
37
  with:
35
38
  xcode: '26.1.1' # Swift 6.2
@@ -40,7 +43,7 @@ jobs:
40
43
  name: "Test Package"
41
44
  runs-on: macos-15
42
45
  steps:
43
- - uses: actions/checkout@v4
46
+ - uses: actions/checkout@v6
44
47
  - uses: ./.github/actions/setup
45
48
  with:
46
49
  xcode: '16.4' # Swift 6.1
@@ -51,7 +54,7 @@ jobs:
51
54
  run: bundle exec rake test:process
52
55
  - name: Upload artifacts
53
56
  if: always()
54
- uses: actions/upload-artifact@v4
57
+ uses: actions/upload-artifact@v6
55
58
  with:
56
59
  name: TestArtifacts
57
60
  path: Tests/Artifacts
@@ -60,7 +63,7 @@ jobs:
60
63
  name: "Emerge Upload"
61
64
  runs-on: macos-15
62
65
  steps:
63
- - uses: actions/checkout@v4
66
+ - uses: actions/checkout@v6
64
67
  - uses: ./.github/actions/setup
65
68
  - name: Build Package
66
69
  run: bundle exec rake emerge:upload
@@ -76,7 +79,7 @@ jobs:
76
79
  xcode:
77
80
  - '16.4' # Swift 6.1
78
81
  steps:
79
- - uses: actions/checkout@v4
82
+ - uses: actions/checkout@v6
80
83
  - uses: apple-actions/import-codesign-certs@v3
81
84
  continue-on-error: true
82
85
  with:
@@ -90,7 +93,7 @@ jobs:
90
93
  - name: Build Static XCFramework
91
94
  run: bundle exec rake build:xcframework\['static'\]
92
95
  - name: Upload XCFrameworks
93
- uses: actions/upload-artifact@v4
96
+ uses: actions/upload-artifact@v6
94
97
  with:
95
98
  name: BuildProducts
96
99
  path: .build/artifacts
@@ -103,7 +106,7 @@ jobs:
103
106
  xcode:
104
107
  - '16.4' # Swift 6.1
105
108
  steps:
106
- - uses: actions/checkout@v4
109
+ - uses: actions/checkout@v6
107
110
  - uses: ./.github/actions/setup
108
111
  with:
109
112
  install-mint: false
@@ -119,7 +122,7 @@ jobs:
119
122
  xcode:
120
123
  - '16.4' # Swift 6.1
121
124
  steps:
122
- - uses: actions/checkout@v4
125
+ - uses: actions/checkout@v6
123
126
  - uses: ./.github/actions/setup
124
127
  with:
125
128
  install-mint: true
@@ -131,7 +134,7 @@ jobs:
131
134
  name: "Test Carthage support"
132
135
  runs-on: macos-15
133
136
  steps:
134
- - uses: actions/checkout@v4
137
+ - uses: actions/checkout@v6
135
138
  - uses: ./.github/actions/setup
136
139
  with:
137
140
  install-mint: true
@@ -144,7 +147,7 @@ jobs:
144
147
  name: "Lint Swift"
145
148
  runs-on: macos-15
146
149
  steps:
147
- - uses: actions/checkout@v4
150
+ - uses: actions/checkout@v6
148
151
  - uses: ./.github/actions/setup
149
152
  - name: Lint Swift
150
153
  run: bundle exec rake lint:swift
@@ -153,7 +156,7 @@ jobs:
153
156
  name: "Lint Embedded Libraries"
154
157
  runs-on: macos-15
155
158
  steps:
156
- - uses: actions/checkout@v4
159
+ - uses: actions/checkout@v6
157
160
  - uses: ./.github/actions/setup
158
161
  - name: Lint Embedded Libraries
159
162
  run: bundle exec rake lint:EmbeddedLibraries
@@ -7,7 +7,7 @@ jobs:
7
7
  stale:
8
8
  runs-on: ubuntu-latest
9
9
  steps:
10
- - uses: actions/stale@v5
10
+ - uses: actions/stale@v10
11
11
  with:
12
12
  only-labels: >
13
13
  can't reproduce
@@ -110,6 +110,9 @@
110
110
  080DEFD32A95711400BE2D96 /* Entry+Serialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001E92A46150D00AB54BA /* Entry+Serialization.swift */; };
111
111
  080DEFD42A95711400BE2D96 /* Archive+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001E02A46150D00AB54BA /* Archive+Helpers.swift */; };
112
112
  080DEFD52A95711800BE2D96 /* Archive+ReadingDeprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001EF2A46150D00AB54BA /* Archive+ReadingDeprecated.swift */; };
113
+ 08D000112A95720000BE2D96 /* Archive+Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08D000012A95720000BE2D96 /* Archive+Deprecated.swift */; };
114
+ 08D000122A95720000BE2D96 /* Date+ZIP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08D000022A95720000BE2D96 /* Date+ZIP.swift */; };
115
+ 08D000132A95720000BE2D96 /* FileManager+ZIPDeprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08D000032A95720000BE2D96 /* FileManager+ZIPDeprecated.swift */; };
113
116
  080DEFD62A95711800BE2D96 /* Entry+ZIP64.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001EE2A46150D00AB54BA /* Entry+ZIP64.swift */; };
114
117
  080DEFD72A95711800BE2D96 /* FileManager+ZIP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001F12A46150D00AB54BA /* FileManager+ZIP.swift */; };
115
118
  080DEFD82A95711800BE2D96 /* Archive+Writing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001EC2A46150D00AB54BA /* Archive+Writing.swift */; };
@@ -361,6 +364,9 @@
361
364
  08C002002A46150D00AB54BA /* Data+CompressionDeprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001ED2A46150D00AB54BA /* Data+CompressionDeprecated.swift */; };
362
365
  08C002012A46150D00AB54BA /* Entry+ZIP64.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001EE2A46150D00AB54BA /* Entry+ZIP64.swift */; };
363
366
  08C002022A46150D00AB54BA /* Archive+ReadingDeprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001EF2A46150D00AB54BA /* Archive+ReadingDeprecated.swift */; };
367
+ 08D000212A95720000BE2D96 /* Archive+Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08D000012A95720000BE2D96 /* Archive+Deprecated.swift */; };
368
+ 08D000222A95720000BE2D96 /* Date+ZIP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08D000022A95720000BE2D96 /* Date+ZIP.swift */; };
369
+ 08D000232A95720000BE2D96 /* FileManager+ZIPDeprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08D000032A95720000BE2D96 /* FileManager+ZIPDeprecated.swift */; };
364
370
  08C002032A46150D00AB54BA /* Data+Serialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001F02A46150D00AB54BA /* Data+Serialization.swift */; };
365
371
  08C002042A46150D00AB54BA /* FileManager+ZIP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001F12A46150D00AB54BA /* FileManager+ZIP.swift */; };
366
372
  08C002052A46150D00AB54BA /* Archive+Progress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001F22A46150D00AB54BA /* Archive+Progress.swift */; };
@@ -382,6 +388,9 @@
382
388
  08C002DE2A46196300AB54BA /* Archive+MemoryFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001E12A46150D00AB54BA /* Archive+MemoryFile.swift */; };
383
389
  08C002DF2A46196300AB54BA /* Archive+Reading.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001E42A46150D00AB54BA /* Archive+Reading.swift */; };
384
390
  08C002E02A46196300AB54BA /* Archive+ReadingDeprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001EF2A46150D00AB54BA /* Archive+ReadingDeprecated.swift */; };
391
+ 08D000312A95720000BE2D96 /* Archive+Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08D000012A95720000BE2D96 /* Archive+Deprecated.swift */; };
392
+ 08D000322A95720000BE2D96 /* Date+ZIP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08D000022A95720000BE2D96 /* Date+ZIP.swift */; };
393
+ 08D000332A95720000BE2D96 /* FileManager+ZIPDeprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08D000032A95720000BE2D96 /* FileManager+ZIPDeprecated.swift */; };
385
394
  08C002E12A46196300AB54BA /* Data+Compression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001E72A46150D00AB54BA /* Data+Compression.swift */; };
386
395
  08C002E22A46196300AB54BA /* Archive+BackingConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001E22A46150D00AB54BA /* Archive+BackingConfiguration.swift */; };
387
396
  08C002E32A46196300AB54BA /* Archive.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001E32A46150D00AB54BA /* Archive.swift */; };
@@ -400,6 +409,9 @@
400
409
  08C002F02A46196300AB54BA /* Archive+MemoryFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001E12A46150D00AB54BA /* Archive+MemoryFile.swift */; };
401
410
  08C002F12A46196300AB54BA /* Archive+Reading.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001E42A46150D00AB54BA /* Archive+Reading.swift */; };
402
411
  08C002F22A46196300AB54BA /* Archive+ReadingDeprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C001EF2A46150D00AB54BA /* Archive+ReadingDeprecated.swift */; };
412
+ 08D000412A95720000BE2D96 /* Archive+Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08D000012A95720000BE2D96 /* Archive+Deprecated.swift */; };
413
+ 08D000422A95720000BE2D96 /* Date+ZIP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08D000022A95720000BE2D96 /* Date+ZIP.swift */; };
414
+ 08D000432A95720000BE2D96 /* FileManager+ZIPDeprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08D000032A95720000BE2D96 /* FileManager+ZIPDeprecated.swift */; };
403
415
  08C002F52A461D6A00AB54BA /* LottieView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C002F42A461D6A00AB54BA /* LottieView.swift */; };
404
416
  08C002F62A461D6A00AB54BA /* LottieView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08C002F42A461D6A00AB54BA /* LottieView.swift */; };
405
417
  08CB2681291ED2B700B4F071 /* AnimationViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08CB2680291ED2B700B4F071 /* AnimationViewTests.swift */; };
@@ -1079,6 +1091,8 @@
1079
1091
  2EAF5B0627A0798700E00531 /* AnimationFontProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2EAF59F227A0798700E00531 /* AnimationFontProvider.swift */; };
1080
1092
  36E57EAC28AF7ADF00B7EFDA /* HardcodedTextProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E57EAB28AF7ADF00B7EFDA /* HardcodedTextProvider.swift */; };
1081
1093
  3E8B8C645ABC4C98B91F7B66 /* LottieURLSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 135AB552F4524F1D995D3A15 /* LottieURLSession.swift */; };
1094
+ 43819F71A58612715B62F78E /* CompatibleFontProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3ABF108DE311DD788312C4B /* CompatibleFontProvider.swift */; };
1095
+ 43819F72A58612715B62F78E /* CompatibleImageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3ABF109DE311DD788312C4B /* CompatibleImageProvider.swift */; };
1082
1096
  57210913291073E400169699 /* RoundedCorners.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57210912291073E400169699 /* RoundedCorners.swift */; };
1083
1097
  57210914291073E400169699 /* RoundedCorners.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57210912291073E400169699 /* RoundedCorners.swift */; };
1084
1098
  57210915291073E400169699 /* RoundedCorners.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57210912291073E400169699 /* RoundedCorners.swift */; };
@@ -1134,6 +1148,10 @@
1134
1148
  82A552752A2FD44B00E47AC8 /* LottieAnimationLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A552742A2FD44B00E47AC8 /* LottieAnimationLayer.swift */; };
1135
1149
  82A552762A2FD44B00E47AC8 /* LottieAnimationLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A552742A2FD44B00E47AC8 /* LottieAnimationLayer.swift */; };
1136
1150
  82A552772A2FD44B00E47AC8 /* LottieAnimationLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82A552742A2FD44B00E47AC8 /* LottieAnimationLayer.swift */; };
1151
+ 85D3C1C42A05E453829E9C8C /* CompatibleFontProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3ABF108DE311DD788312C4B /* CompatibleFontProvider.swift */; };
1152
+ 85D3C1C52A05E453829E9C8C /* CompatibleImageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3ABF109DE311DD788312C4B /* CompatibleImageProvider.swift */; };
1153
+ 8BCB93B72127BD2FDB0C4DEE /* CompatibleFontProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3ABF108DE311DD788312C4B /* CompatibleFontProvider.swift */; };
1154
+ 8BCB93B82127BD2FDB0C4DEE /* CompatibleImageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3ABF109DE311DD788312C4B /* CompatibleImageProvider.swift */; };
1137
1155
  A1D5BAAC27C731A500777D06 /* DataURLTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1D5BAAB27C731A500777D06 /* DataURLTests.swift */; };
1138
1156
  A40460592832C52B00ACFEDC /* BlendMode+Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = A40460582832C52B00ACFEDC /* BlendMode+Filter.swift */; };
1139
1157
  A404605A2832C52B00ACFEDC /* BlendMode+Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = A40460582832C52B00ACFEDC /* BlendMode+Filter.swift */; };
@@ -1164,6 +1182,8 @@
1164
1182
  E95C38752C15559D00329910 /* LayerEffectNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = E95C38702C14D14300329910 /* LayerEffectNode.swift */; };
1165
1183
  E95C38762C15559E00329910 /* LayerEffectNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = E95C38702C14D14300329910 /* LayerEffectNode.swift */; };
1166
1184
  E95C38772C15559F00329910 /* LayerEffectNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = E95C38702C14D14300329910 /* LayerEffectNode.swift */; };
1185
+ F5BFF3060F37A38192BF9C77 /* CompatibleFontProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3ABF108DE311DD788312C4B /* CompatibleFontProvider.swift */; };
1186
+ F5BFF3070F37A38192BF9C77 /* CompatibleImageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3ABF109DE311DD788312C4B /* CompatibleImageProvider.swift */; };
1167
1187
  /* End PBXBuildFile section */
1168
1188
 
1169
1189
  /* Begin PBXContainerItemProxy section */
@@ -1218,6 +1238,9 @@
1218
1238
  08C001ED2A46150D00AB54BA /* Data+CompressionDeprecated.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Data+CompressionDeprecated.swift"; sourceTree = "<group>"; };
1219
1239
  08C001EE2A46150D00AB54BA /* Entry+ZIP64.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Entry+ZIP64.swift"; sourceTree = "<group>"; };
1220
1240
  08C001EF2A46150D00AB54BA /* Archive+ReadingDeprecated.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Archive+ReadingDeprecated.swift"; sourceTree = "<group>"; };
1241
+ 08D000012A95720000BE2D96 /* Archive+Deprecated.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Archive+Deprecated.swift"; sourceTree = "<group>"; };
1242
+ 08D000022A95720000BE2D96 /* Date+ZIP.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Date+ZIP.swift"; sourceTree = "<group>"; };
1243
+ 08D000032A95720000BE2D96 /* FileManager+ZIPDeprecated.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "FileManager+ZIPDeprecated.swift"; sourceTree = "<group>"; };
1221
1244
  08C001F02A46150D00AB54BA /* Data+Serialization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Data+Serialization.swift"; sourceTree = "<group>"; };
1222
1245
  08C001F12A46150D00AB54BA /* FileManager+ZIP.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "FileManager+ZIP.swift"; sourceTree = "<group>"; };
1223
1246
  08C001F22A46150D00AB54BA /* Archive+Progress.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Archive+Progress.swift"; sourceTree = "<group>"; };
@@ -1493,6 +1516,8 @@
1493
1516
  D453D8B028FF9E3A00D3F49C /* DefaultAnimationCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultAnimationCache.swift; sourceTree = "<group>"; };
1494
1517
  E95C386E2C14B7FC00329910 /* DropShadowNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DropShadowNode.swift; sourceTree = "<group>"; };
1495
1518
  E95C38702C14D14300329910 /* LayerEffectNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LayerEffectNode.swift; sourceTree = "<group>"; };
1519
+ F3ABF108DE311DD788312C4B /* CompatibleFontProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CompatibleFontProvider.swift; sourceTree = "<group>"; };
1520
+ F3ABF109DE311DD788312C4B /* CompatibleImageProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CompatibleImageProvider.swift; sourceTree = "<group>"; };
1496
1521
  /* End PBXFileReference section */
1497
1522
 
1498
1523
  /* Begin PBXFrameworksBuildPhase section */
@@ -1617,6 +1642,9 @@
1617
1642
  08C001ED2A46150D00AB54BA /* Data+CompressionDeprecated.swift */,
1618
1643
  08C001EE2A46150D00AB54BA /* Entry+ZIP64.swift */,
1619
1644
  08C001EF2A46150D00AB54BA /* Archive+ReadingDeprecated.swift */,
1645
+ 08D000012A95720000BE2D96 /* Archive+Deprecated.swift */,
1646
+ 08D000022A95720000BE2D96 /* Date+ZIP.swift */,
1647
+ 08D000032A95720000BE2D96 /* FileManager+ZIPDeprecated.swift */,
1620
1648
  08C001F02A46150D00AB54BA /* Data+Serialization.swift */,
1621
1649
  08C001F12A46150D00AB54BA /* FileManager+ZIP.swift */,
1622
1650
  08C001F22A46150D00AB54BA /* Archive+Progress.swift */,
@@ -2342,6 +2370,8 @@
2342
2370
  children = (
2343
2371
  2EAF59D027A0798700E00531 /* CompatibleAnimationKeypath.swift */,
2344
2372
  2EAF59D127A0798700E00531 /* CompatibleAnimationView.swift */,
2373
+ F3ABF108DE311DD788312C4B /* CompatibleFontProvider.swift */,
2374
+ F3ABF109DE311DD788312C4B /* CompatibleImageProvider.swift */,
2345
2375
  );
2346
2376
  path = Compatibility;
2347
2377
  sourceTree = "<group>";
@@ -2541,8 +2571,6 @@
2541
2571
  dependencies = (
2542
2572
  );
2543
2573
  name = "Lottie-iOS";
2544
- packageProductDependencies = (
2545
- );
2546
2574
  productName = Lottie;
2547
2575
  productReference = 2E80409A27A0725D006E74CB /* Lottie.framework */;
2548
2576
  productType = "com.apple.product-type.framework";
@@ -2940,6 +2968,9 @@
2940
2968
  080DEF922A9570DD00BE2D96 /* LottieAnimationCache.swift in Sources */,
2941
2969
  080DF0622A95716D00BE2D96 /* LayerEffect.swift in Sources */,
2942
2970
  080DEFD52A95711800BE2D96 /* Archive+ReadingDeprecated.swift in Sources */,
2971
+ 08D000112A95720000BE2D96 /* Archive+Deprecated.swift in Sources */,
2972
+ 08D000122A95720000BE2D96 /* Date+ZIP.swift in Sources */,
2973
+ 08D000132A95720000BE2D96 /* FileManager+ZIPDeprecated.swift in Sources */,
2943
2974
  080DF0082A95712D00BE2D96 /* ImageCompositionLayer.swift in Sources */,
2944
2975
  080DEFA52A9570FB00BE2D96 /* CallbackContextEpoxyModeled.swift in Sources */,
2945
2976
  080DF00C2A95713000BE2D96 /* LayerTextProvider.swift in Sources */,
@@ -2986,6 +3017,8 @@
2986
3017
  080DEFAA2A9570FE00BE2D96 /* SetContentProviding.swift in Sources */,
2987
3018
  080DF07E2A95718200BE2D96 /* RootAnimationLayer.swift in Sources */,
2988
3019
  080DEFFD2A95712400BE2D96 /* EllipseAnimation.swift in Sources */,
3020
+ 43819F71A58612715B62F78E /* CompatibleFontProvider.swift in Sources */,
3021
+ 43819F72A58612715B62F78E /* CompatibleImageProvider.swift in Sources */,
2989
3022
  );
2990
3023
  runOnlyForDeploymentPostprocessing = 0;
2991
3024
  };
@@ -3153,6 +3186,9 @@
3153
3186
  08E6CF932A86E29100A6D92F /* LottieViewType.swift in Sources */,
3154
3187
  08C001F32A46150D00AB54BA /* Archive+Helpers.swift in Sources */,
3155
3188
  08C002022A46150D00AB54BA /* Archive+ReadingDeprecated.swift in Sources */,
3189
+ 08D000212A95720000BE2D96 /* Archive+Deprecated.swift in Sources */,
3190
+ 08D000222A95720000BE2D96 /* Date+ZIP.swift in Sources */,
3191
+ 08D000232A95720000BE2D96 /* FileManager+ZIPDeprecated.swift in Sources */,
3156
3192
  2E9C96512822F43100677516 /* PreCompositionLayer.swift in Sources */,
3157
3193
  2EAF5AF227A0798700E00531 /* AnyValueProvider.swift in Sources */,
3158
3194
  2E9C96632822F43100677516 /* CoreTextRenderLayer.swift in Sources */,
@@ -3276,6 +3312,8 @@
3276
3312
  2E9C96122822F43100677516 /* DashPattern.swift in Sources */,
3277
3313
  2E9C960C2822F43100677516 /* ShapeLayerModel.swift in Sources */,
3278
3314
  2E9C97082822F43100677516 /* CompatibilityTracker.swift in Sources */,
3315
+ F5BFF3060F37A38192BF9C77 /* CompatibleFontProvider.swift in Sources */,
3316
+ F5BFF3070F37A38192BF9C77 /* CompatibleImageProvider.swift in Sources */,
3279
3317
  );
3280
3318
  runOnlyForDeploymentPostprocessing = 0;
3281
3319
  };
@@ -3330,6 +3368,9 @@
3330
3368
  08C002D82A46196300AB54BA /* Data+Serialization.swift in Sources */,
3331
3369
  08E207582A56014E002DCE17 /* EpoxyModelProperty.swift in Sources */,
3332
3370
  08C002E02A46196300AB54BA /* Archive+ReadingDeprecated.swift in Sources */,
3371
+ 08D000312A95720000BE2D96 /* Archive+Deprecated.swift in Sources */,
3372
+ 08D000322A95720000BE2D96 /* Date+ZIP.swift in Sources */,
3373
+ 08D000332A95720000BE2D96 /* FileManager+ZIPDeprecated.swift in Sources */,
3333
3374
  08E207342A56014E002DCE17 /* ErasedContentProviding.swift in Sources */,
3334
3375
  6D99D6442823790700E5205B /* LegacyGradientFillRenderer.swift in Sources */,
3335
3376
  2EAF5B0527A0798700E00531 /* AnimationFontProvider.swift in Sources */,
@@ -3593,6 +3634,8 @@
3593
3634
  2E9C96132822F43100677516 /* DashPattern.swift in Sources */,
3594
3635
  2E9C960D2822F43100677516 /* ShapeLayerModel.swift in Sources */,
3595
3636
  2E9C97092822F43100677516 /* CompatibilityTracker.swift in Sources */,
3637
+ 8BCB93B72127BD2FDB0C4DEE /* CompatibleFontProvider.swift in Sources */,
3638
+ 8BCB93B82127BD2FDB0C4DEE /* CompatibleImageProvider.swift in Sources */,
3596
3639
  );
3597
3640
  runOnlyForDeploymentPostprocessing = 0;
3598
3641
  };
@@ -3881,8 +3924,13 @@
3881
3924
  2E9C96142822F43100677516 /* DashPattern.swift in Sources */,
3882
3925
  2E9C960E2822F43100677516 /* ShapeLayerModel.swift in Sources */,
3883
3926
  08C002F22A46196300AB54BA /* Archive+ReadingDeprecated.swift in Sources */,
3927
+ 08D000412A95720000BE2D96 /* Archive+Deprecated.swift in Sources */,
3928
+ 08D000422A95720000BE2D96 /* Date+ZIP.swift in Sources */,
3929
+ 08D000432A95720000BE2D96 /* FileManager+ZIPDeprecated.swift in Sources */,
3884
3930
  2E9C970A2822F43100677516 /* CompatibilityTracker.swift in Sources */,
3885
3931
  08C002E52A46196300AB54BA /* Archive+Writing.swift in Sources */,
3932
+ 85D3C1C42A05E453829E9C8C /* CompatibleFontProvider.swift in Sources */,
3933
+ 85D3C1C52A05E453829E9C8C /* CompatibleImageProvider.swift in Sources */,
3886
3934
  );
3887
3935
  runOnlyForDeploymentPostprocessing = 0;
3888
3936
  };
package/README.md CHANGED
@@ -41,7 +41,7 @@ To install Lottie using [Swift Package Manager](https://github.com/swiftlang/swi
41
41
  or you can add the following dependency to your `Package.swift`:
42
42
 
43
43
  ```swift
44
- .package(url: "https://github.com/airbnb/lottie-spm.git", from: "4.5.2")
44
+ .package(url: "https://github.com/airbnb/lottie-spm.git", from: "4.6.1")
45
45
  ```
46
46
 
47
47
  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.
@@ -46,7 +46,10 @@ extension GradientRenderLayer {
46
46
  case .rgb:
47
47
  colors = .init(
48
48
  repeating: CGColor.rgb(0, 0, 0),
49
- count: gradient.numberOfColors
49
+ count: try gradientColorsCount(
50
+ in: context,
51
+ gradient: gradient
52
+ )
50
53
  )
51
54
 
52
55
  case .alpha:
@@ -148,6 +151,34 @@ extension GradientRenderLayer {
148
151
  context: context
149
152
  )
150
153
  }
154
+
155
+ /// Core Animation ignores the gradient animation when the number of provided colors
156
+ /// does not match the expected count. For example, if the `colors` array is initialized
157
+ /// from a JSON value containing 3 colors, but a value provider supplies only 2 colors,
158
+ /// the animation will be ignored. To avoid this, always ensure the `CAGradientLayer`
159
+ /// color count matches the input colors, whether defined in the JSON or supplied via
160
+ /// a value provider.
161
+ private func gradientColorsCount(
162
+ in context: LayerAnimationContext,
163
+ gradient: GradientShapeItem
164
+ ) throws -> Int {
165
+ let colorsProperty = LayerProperty<[CGColor]>.colors.customizableProperty
166
+
167
+ guard
168
+ let colorsProperty,
169
+ let customKeyframes = try context.valueProviderStore.customKeyframes(
170
+ of: colorsProperty,
171
+ for: AnimationKeypath(
172
+ keys: context.currentKeypath.keys + colorsProperty.name.map { $0.rawValue }
173
+ ),
174
+ context: context
175
+ )
176
+ else {
177
+ return gradient.numberOfColors
178
+ }
179
+
180
+ return customKeyframes.keyframes[0].value.count
181
+ }
151
182
  }
152
183
 
153
184
  // MARK: - RadialGradientKeyframes
@@ -223,7 +254,7 @@ extension GradientShapeItem {
223
254
  // and its relative location within the gradient.
224
255
  var colors = GradientColorConfiguration()
225
256
 
226
- for colorIndex in 0..<numberOfColors {
257
+ for colorIndex in 0 ..< numberOfColors {
227
258
  let colorStartIndex = colorIndex * 4
228
259
 
229
260
  let colorLocation = CGFloat(colorComponents[colorStartIndex])
@@ -18,9 +18,22 @@ class BaseAnimationLayer: CALayer, AnimationLayer {
18
18
  }
19
19
 
20
20
  func setupAnimations(context: LayerAnimationContext) throws {
21
- for childAnimationLayer in managedSublayers {
21
+ // Only set up animations for sublayers here, not MaskCompositionLayer masks.
22
+ // MaskCompositionLayer animations must be set up separately with the parent's context
23
+ // (without precomp time remapping), since mask keyframes are defined
24
+ // in the parent's global timeline. See BaseCompositionLayer.setupLayerAnimations.
25
+ for childAnimationLayer in sublayers ?? [] {
22
26
  try (childAnimationLayer as? AnimationLayer)?.setupAnimations(context: context)
23
27
  }
28
+
29
+ // Set up animations for non-MaskCompositionLayer masks (e.g. alpha matte masks
30
+ // created in CALayer+setupLayerHierarchy.swift). These receive the same context
31
+ // as the layer they're masking. MaskCompositionLayer is excluded here because it
32
+ // is handled explicitly in BaseCompositionLayer.setupLayerAnimations with the
33
+ // parent's non-remapped context.
34
+ if let maskAnimationLayer = mask as? AnimationLayer, !(mask is MaskCompositionLayer) {
35
+ try maskAnimationLayer.setupAnimations(context: context)
36
+ }
24
37
  }
25
38
 
26
39
  // MARK: Private
@@ -79,6 +79,13 @@ class BaseCompositionLayer: BaseAnimationLayer {
79
79
  if let dropShadowModel = dropShadowEffect ?? dropShadowStyle {
80
80
  try contentsLayer.addDropShadowAnimations(for: dropShadowModel, context: context)
81
81
  }
82
+
83
+ // Set up mask animations with the layer's own context (parent timeline).
84
+ // Mask keyframes are defined in the parent's global timeline, not the precomp's
85
+ // local timeline, so the mask must not receive the time-remapped child context.
86
+ if let maskLayer = contentsLayer.mask as? AnimationLayer {
87
+ try maskLayer.setupAnimations(context: context)
88
+ }
82
89
  }
83
90
  }
84
91
 
@@ -552,16 +552,16 @@ extension [ShapeItemLayer.Item] {
552
552
  !renderGroup.pathItems.isEmpty
553
553
  }
554
554
 
555
- let itemsInValidRenderGroups = NSSet(
556
- array: renderGroups.lazy
555
+ let itemsInValidRenderGroups = Set(
556
+ renderGroups.lazy
557
557
  .flatMap { $0.pathItems + $0.otherItems }
558
- .map { $0.item }
558
+ .map { ObjectIdentifier($0.item) }
559
559
  )
560
560
 
561
561
  // `unusedItems` should only include each original item a single time,
562
562
  // and should preserve the existing order
563
563
  let itemsNotInValidRenderGroups = filter { item in
564
- !itemsInValidRenderGroups.contains(item.item)
564
+ !itemsInValidRenderGroups.contains(ObjectIdentifier(item.item))
565
565
  }
566
566
 
567
567
  return (validGroups: renderGroups, unusedItems: itemsNotInValidRenderGroups)
@@ -11,14 +11,14 @@ final class EpoxyLogger {
11
11
  assert: @escaping Assert = { condition, message, file, line in
12
12
  // If we default to `Swift.assert` directly with `assert: Assert = Swift.assert`,
13
13
  // the call will unexpectedly not respect the -O flag and will crash in release
14
- // https://github.com/swiftlang/swift/issues/60249
14
+ // https://github.com/apple/swift/issues/60249
15
15
  Swift.assert(condition(), message(), file: file, line: line)
16
16
  },
17
17
  assertionFailure: @escaping AssertionFailure = { message, file, line in
18
18
  // If we default to `Swift.assertionFailure` directly with
19
19
  // `assertionFailure: AssertionFailure = Swift.assertionFailure`,
20
20
  // the call will unexpectedly not respect the -O flag and will crash in release
21
- // https://github.com/swiftlang/swift/issues/60249
21
+ // https://github.com/apple/swift/issues/60249
22
22
  Swift.assertionFailure(message(), file: file, line: line)
23
23
  },
24
24
  warn: @escaping Warn = { message, _, _ in
@@ -36,6 +36,7 @@ final class EpoxyLogger {
36
36
  // MARK: Internal
37
37
 
38
38
  /// Logs that an assertion occurred.
39
+ // swiftformat:disable trailingCommas
39
40
  typealias Assert = (
40
41
  _ condition: @autoclosure () -> Bool,
41
42
  _ message: @autoclosure () -> String,
@@ -57,6 +58,8 @@ final class EpoxyLogger {
57
58
  _ line: UInt
58
59
  ) -> Void
59
60
 
61
+ // swiftformat:enable trailingCommas
62
+
60
63
  /// The shared instance used to log Epoxy assertions and warnings.
61
64
  ///
62
65
  /// Set this to a new logger instance to intercept assertions and warnings logged by Epoxy.
@@ -11,17 +11,17 @@
11
11
  /// For example, to declare a `EpoxyModelProperty` that fulfills the `TitleProviding` protocol:
12
12
  ///
13
13
  /// ````
14
- /// internal protocol TitleProviding {
14
+ /// protocol TitleProviding {
15
15
  /// var title: String? { get }
16
16
  /// }
17
17
  ///
18
18
  /// extension EpoxyModeled where Self: TitleProviding {
19
- /// internal var title: String? {
19
+ /// var title: String? {
20
20
  /// get { self[titleProperty] }
21
21
  /// set { self[titleProperty] = newValue }
22
22
  /// }
23
23
  ///
24
- /// internal func title(_ value: String?) -> Self {
24
+ /// func title(_ value: String?) -> Self {
25
25
  /// copy(updating: titleProperty, to: value)
26
26
  /// }
27
27
  ///
@@ -74,7 +74,7 @@ extension EpoxyModelProperty {
74
74
  self.update = update
75
75
  }
76
76
 
77
- // MARK: Public
77
+ // MARK: Internal
78
78
 
79
79
  /// A closure used to update an `EpoxyModelProperty` from an old value to a new value.
80
80
  var update: (_ old: Value, _ new: Value) -> Value
@@ -31,7 +31,7 @@ extension EpoxyModeled {
31
31
  /// property, e.g.:
32
32
  ///
33
33
  /// ````
34
- /// internal func title(_ value: String?) -> Self {
34
+ /// func title(_ value: String?) -> Self {
35
35
  /// copy(updating: titleProperty, to: value)
36
36
  /// }
37
37
  /// ````
@@ -14,7 +14,7 @@ protocol ErasedContentProviding {
14
14
  /// A closure that can be called to determine whether the given `model`'s `erasedContent` is equal
15
15
  /// to this model's `erasedContent`, else `nil` if there is no content or the content is always
16
16
  /// equal.
17
- var isErasedContentEqual: ((Self) -> Bool)? { get }
17
+ var isErasedContentEqual: ((ErasedContentProviding) -> Bool)? { get }
18
18
  }
19
19
 
20
20
  // MARK: - EpoxyModeled
@@ -32,7 +32,7 @@ extension EpoxyModeled where Self: ErasedContentProviding {
32
32
  /// A closure that can be called to determine whether the given `model`'s `erasedContent` is equal
33
33
  /// to this model's `erasedContent`, else `nil` if there is no content or the content is always
34
34
  /// equal.
35
- var isErasedContentEqual: ((Self) -> Bool)? {
35
+ var isErasedContentEqual: ((ErasedContentProviding) -> Bool)? {
36
36
  get { self[isContentEqualProperty] }
37
37
  set { self[isContentEqualProperty] = newValue }
38
38
  }
@@ -40,10 +40,10 @@ extension EpoxyModeled where Self: ErasedContentProviding {
40
40
  // MARK: Private
41
41
 
42
42
  private var contentProperty: EpoxyModelProperty<Any?> {
43
- .init(keyPath: \Self.erasedContent, defaultValue: nil, updateStrategy: .replace)
43
+ .init(keyPath: \ErasedContentProviding.erasedContent, defaultValue: nil, updateStrategy: .replace)
44
44
  }
45
45
 
46
- private var isContentEqualProperty: EpoxyModelProperty<((Self) -> Bool)?> {
47
- .init(keyPath: \Self.isErasedContentEqual, defaultValue: nil, updateStrategy: .replace)
46
+ private var isContentEqualProperty: EpoxyModelProperty<((ErasedContentProviding) -> Bool)?> {
47
+ .init(keyPath: \ErasedContentProviding.isErasedContentEqual, defaultValue: nil, updateStrategy: .replace)
48
48
  }
49
49
  }
@@ -26,7 +26,7 @@ struct ViewDifferentiator: Hashable {
26
26
  self.styleID = styleID
27
27
  }
28
28
 
29
- // MARK: Public
29
+ // MARK: Internal
30
30
 
31
31
  var viewTypeDescription: String
32
32
  var styleID: AnyHashable?
@@ -17,11 +17,11 @@ extension CallbackContextEpoxyModeled where Self: WillDisplayProviding {
17
17
  // MARK: Internal
18
18
 
19
19
  /// A closure that's called when a view is about to be displayed, before it has been added to the
20
- /// view hierarcy.
20
+ /// view hierarchy.
21
21
  typealias WillDisplay = (_ context: CallbackContext) -> Void
22
22
 
23
23
  /// A closure that's called when the view is about to be displayed, before it has been added to
24
- /// the view hierarcy.
24
+ /// the view hierarchy.
25
25
  var willDisplay: WillDisplay? {
26
26
  get { self[willDisplayProperty] }
27
27
  set { self[willDisplayProperty] = newValue }
@@ -1,7 +1,7 @@
1
1
  ## EpoxyCore
2
2
 
3
3
  This directory includes the source code of the EpoxyCore library, from the following release:
4
- https://github.com/airbnb/epoxy-ios/releases/tag/0.10.0
4
+ https://github.com/airbnb/epoxy-ios/releases/tag/0.11.0
5
5
 
6
6
  Lottie is distributed via multiple package managers (SPM, Cocoapods, Carthage, and NPM),
7
7
  each with different packaging and compilation requirements.
@@ -1,7 +1,6 @@
1
1
  // Created by matthew_cheok on 11/19/21.
2
2
  // Copyright © 2021 Airbnb Inc. All rights reserved.
3
3
 
4
- #if canImport(SwiftUI)
5
4
  import SwiftUI
6
5
 
7
6
  // MARK: - EpoxyIntrinsicContentSizeInvalidator
@@ -31,15 +30,5 @@ struct EpoxyIntrinsicContentSizeInvalidator {
31
30
 
32
31
  extension EnvironmentValues {
33
32
  /// A means of invalidating the intrinsic content size of the parent `EpoxySwiftUIHostingView`.
34
- var epoxyIntrinsicContentSizeInvalidator: EpoxyIntrinsicContentSizeInvalidator {
35
- get { self[EpoxyIntrinsicContentSizeInvalidatorKey.self] }
36
- set { self[EpoxyIntrinsicContentSizeInvalidatorKey.self] = newValue }
37
- }
38
- }
39
-
40
- // MARK: - EpoxyIntrinsicContentSizeInvalidatorKey
41
-
42
- private struct EpoxyIntrinsicContentSizeInvalidatorKey: EnvironmentKey {
43
- static let defaultValue = EpoxyIntrinsicContentSizeInvalidator(invalidate: { })
33
+ @Entry var epoxyIntrinsicContentSizeInvalidator = EpoxyIntrinsicContentSizeInvalidator(invalidate: { })
44
34
  }
45
- #endif
@@ -1,7 +1,6 @@
1
1
  // Created by eric_horacek on 10/8/21.
2
2
  // Copyright © 2021 Airbnb Inc. All rights reserved.
3
3
 
4
- #if canImport(SwiftUI)
5
4
  import SwiftUI
6
5
 
7
6
  // MARK: - View
@@ -23,16 +22,7 @@ extension View {
23
22
 
24
23
  extension EnvironmentValues {
25
24
  /// The layout margins of the parent `EpoxySwiftUIHostingView`, else zero if there is none.
26
- var epoxyLayoutMargins: EdgeInsets {
27
- get { self[EpoxyLayoutMarginsKey.self] }
28
- set { self[EpoxyLayoutMarginsKey.self] = newValue }
29
- }
30
- }
31
-
32
- // MARK: - EpoxyLayoutMarginsKey
33
-
34
- private struct EpoxyLayoutMarginsKey: EnvironmentKey {
35
- static let defaultValue = EdgeInsets()
25
+ @Entry var epoxyLayoutMargins = EdgeInsets()
36
26
  }
37
27
 
38
28
  // MARK: - EpoxyLayoutMarginsPadding
@@ -46,4 +36,3 @@ private struct EpoxyLayoutMarginsPadding: ViewModifier {
46
36
  content.padding(epoxyLayoutMargins)
47
37
  }
48
38
  }
49
- #endif