@octane-xplat/lottie 0.0.1 → 0.10.0
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.
- package/README.md +56 -2
- package/dist/native/cx.mobile.js +11 -0
- package/dist/native/escape-props.js +39 -0
- package/dist/native/index.js +183 -0
- package/dist/native/layout-child.js +38 -0
- package/dist/native/octane-client-build.json +8 -0
- package/dist/native/vendor/ui-lottie/index.android.js +286 -0
- package/dist/native/vendor/ui-lottie/index.ios.js +214 -0
- package/dist/native/vendor/ui-lottie/src/lottie/index.common.js +50 -0
- package/dist/native/vendor/ui-lottie/src/lottie/utils.js +6 -0
- package/dist/web/escape-props.web.js +17 -0
- package/dist/web/index.js +346 -0
- package/dist/web/layout-child.web.js +47 -0
- package/dist/web/octane-client-build.json +8 -0
- package/package.json +104 -11
- package/platforms/android/include.gradle +7 -0
- package/platforms/android/java/com/nativescript/lottie/LottieAnimationView.java +92 -0
- package/platforms/android/lottie.aar +0 -0
- package/platforms/android/native-api-usage.json +16 -0
- package/platforms/ios/Podfile +5 -0
- package/platforms/macos/LICENSE-EpoxyCore-Apache-2.0.txt +201 -0
- package/platforms/macos/LICENSE-LRUCache-MIT.txt +22 -0
- package/platforms/macos/LICENSE-Lottie-Apache-2.0.txt +201 -0
- package/platforms/macos/LICENSE-ZIPFoundation-MIT.txt +21 -0
- package/platforms/macos/UPSTREAM.md +13 -0
- package/platforms/macos/resources/PrivacyInfo.xcprivacy +23 -0
- package/platforms/macos/resources/THIRD-PARTY-NOTICES.txt +10 -0
- package/platforms/macos/src/XplatAppKitLottie.swift +246 -0
- package/platforms/macos/src/vendor/Lottie/PrivacyInfo.xcprivacy +23 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Animations/CAAnimation+TimingConfiguration.swift +81 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Animations/CALayer+addAnimation.swift +476 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Animations/CombinedShapeAnimation.swift +92 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Animations/CustomPathAnimation.swift +89 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Animations/DropShadowAnimation.swift +179 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Animations/EllipseAnimation.swift +53 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Animations/GradientAnimations.swift +287 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Animations/LayerProperty.swift +440 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Animations/OpacityAnimation.swift +53 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Animations/RectangleAnimation.swift +59 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Animations/ShapeAnimation.swift +246 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Animations/StarAnimation.swift +119 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Animations/StrokeAnimation.swift +96 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Animations/TransformAnimations.swift +380 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Animations/VisibilityAnimation.swift +63 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/CompatibilityTracker.swift +129 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/CoreAnimationLayer.swift +645 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Extensions/CALayer+fillBounds.swift +35 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Extensions/KeyframeGroup+exactlyOneKeyframe.swift +28 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Extensions/Keyframes+combined.swift +345 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Extensions/Keyframes+timeRemapping.swift +46 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Layers/AnimationLayer.swift +169 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Layers/BaseAnimationLayer.swift +46 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Layers/BaseCompositionLayer.swift +120 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Layers/CALayer+setupLayerHierarchy.swift +169 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Layers/GradientRenderLayer.swift +101 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Layers/ImageLayer.swift +81 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Layers/InfiniteOpaqueAnimationLayer.swift +57 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Layers/LayerModel+makeAnimationLayer.swift +59 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Layers/MaskCompositionLayer.swift +139 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Layers/PreCompLayer.swift +107 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Layers/RepeaterLayer.swift +113 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Layers/ShapeItemLayer.swift +346 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Layers/ShapeLayer.swift +569 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Layers/SolidLayer.swift +66 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Layers/TextLayer.swift +157 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/Layers/TransformLayer.swift +13 -0
- package/platforms/macos/src/vendor/Lottie/Private/CoreAnimation/ValueProviderStore.swift +157 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Diffing/Collection+Diff.swift +267 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Diffing/Diffable.swift +19 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Diffing/DiffableSection.swift +16 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Diffing/IndexChangeset.swift +187 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Diffing/SectionedChangeset.swift +22 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Logging/EpoxyLogger.swift +102 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/CallbackContextEpoxyModeled.swift +8 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/EpoxyModelArrayBuilder.swift +48 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/EpoxyModelProperty.swift +158 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/EpoxyModelStorage.swift +88 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/EpoxyModeled.swift +54 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/Internal/AnyEpoxyModelProperty.swift +31 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/Internal/ClassReference.swift +39 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/AnimatedProviding.swift +10 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/DataIDProviding.swift +58 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/DidDisplayProviding.swift +41 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/DidEndDisplayingProviding.swift +42 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/DidSelectProviding.swift +36 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/ErasedContentProviding.swift +49 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/MakeViewProviding.swift +61 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/SetBehaviorsProviding.swift +38 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/SetContentProviding.swift +38 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/StyleIDProviding.swift +38 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/TraitCollectionProviding.swift +14 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/ViewDifferentiatorProviding.swift +34 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/ViewProviding.swift +13 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/WillDisplayProviding.swift +41 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Model/ViewEpoxyModeled.swift +10 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/README.md +30 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxySwiftUIIntrinsicContentSizeInvalidator.swift +34 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxySwiftUILayoutMargins.swift +38 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxyableView+SwiftUIView.swift +165 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/MeasuringViewRepresentable.swift +127 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/SwiftUIMeasurementContainer.swift +468 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/SwiftUIView.swift +146 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/UIView+SwiftUIView.swift +39 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/UIViewConfiguringSwiftUIView.swift +41 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Views/BehaviorsConfigurableView.swift +45 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Views/ContentConfigurableView.swift +36 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Views/EpoxyableView.swift +5 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Views/StyledView.swift +43 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/EpoxyCore/Views/ViewType.swift +47 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/LRUCache/LRUCache.swift +257 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/LRUCache/README.md +24 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/README.md +43 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/Archive+BackingConfiguration.swift +149 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/Archive+Deprecated.swift +23 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/Archive+Helpers.swift +361 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/Archive+MemoryFile.swift +205 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/Archive+Progress.swift +66 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/Archive+Reading.swift +160 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/Archive+ReadingDeprecated.swift +50 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/Archive+Writing.swift +403 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/Archive+WritingDeprecated.swift +95 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/Archive+ZIP64.swift +191 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/Archive.swift +404 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/Data+Compression.swift +632 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/Data+CompressionDeprecated.swift +43 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/Data+Serialization.swift +146 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/Date+ZIP.swift +101 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/Entry+Serialization.swift +191 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/Entry+ZIP64.swift +170 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/Entry.swift +669 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/FileManager+ZIP.swift +405 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/FileManager+ZIPDeprecated.swift +28 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/README.md +24 -0
- package/platforms/macos/src/vendor/Lottie/Private/EmbeddedLibraries/ZipFoundation/URL+ZIP.swift +34 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/LayerContainers/CompLayers/CompositionLayer.swift +177 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/LayerContainers/CompLayers/ImageCompositionLayer.swift +54 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/LayerContainers/CompLayers/MaskContainerLayer.swift +191 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/LayerContainers/CompLayers/NullCompositionLayer.swift +28 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/LayerContainers/CompLayers/PreCompositionLayer.swift +137 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/LayerContainers/CompLayers/ShapeCompositionLayer.swift +60 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/LayerContainers/CompLayers/SolidCompositionLayer.swift +57 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/LayerContainers/CompLayers/TextCompositionLayer.swift +247 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/LayerContainers/MainThreadAnimationLayer.swift +321 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/LayerContainers/Utility/CachedImageProvider.swift +56 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/LayerContainers/Utility/CompositionLayersInitializer.swift +103 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/LayerContainers/Utility/CoreTextRenderLayer.swift +424 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/LayerContainers/Utility/InvertedMatteLayer.swift +55 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/LayerContainers/Utility/LayerFontProvider.swift +39 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/LayerContainers/Utility/LayerImageProvider.swift +52 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/LayerContainers/Utility/LayerTextProvider.swift +38 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/LayerContainers/Utility/LayerTransformNode.swift +149 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Extensions/ItemsExtension.swift +146 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/NodeProperties/NodeProperty.swift +62 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/AnyNodeProperty.swift +53 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/AnyValueContainer.swift +26 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/KeypathSearchable.swift +23 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/NodeProperties/Protocols/NodePropertyMap.swift +43 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/NodeProperties/ValueContainer.swift +47 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/NodeProperties/ValueProviders/GroupInterpolator.swift +39 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/NodeProperties/ValueProviders/SingleValueProvider.swift +43 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/LayerEffectNodes/DropShadowNode.swift +102 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/LayerEffectNodes/LayerEffectNode.swift +25 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/RoundedCornersNode.swift +85 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/ModifierNodes/TrimPathNode.swift +281 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/GroupOutputNode.swift +74 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PassThroughOutputNode.swift +47 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/PathOutputNode.swift +89 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/FillRenderer.swift +69 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientFillRenderer.swift +253 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/GradientStrokeRenderer.swift +64 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/LegacyGradientFillRenderer.swift +158 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/OutputNodes/Renderables/StrokeRenderer.swift +165 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/EllipseNode.swift +143 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/PolygonNode.swift +173 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/RectNode.swift +238 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/ShapeNode.swift +73 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/PathNodes/StarNode.swift +224 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/RenderContainers/GroupNode.swift +162 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/FillNode.swift +88 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientFillNode.swift +103 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/GradientStrokeNode.swift +149 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/RenderNodes/StrokeNode.swift +179 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Nodes/Text/TextAnimatorNode.swift +345 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Protocols/AnimatorNode.swift +197 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Protocols/PathNode.swift +20 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/Protocols/RenderNode.swift +60 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeContainerLayer.swift +78 -0
- package/platforms/macos/src/vendor/Lottie/Private/MainThread/NodeRenderSystem/RenderLayers/ShapeRenderLayer.swift +98 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Assets/Asset.swift +51 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Assets/AssetLibrary.swift +75 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Assets/ImageAsset.swift +141 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Assets/PrecompAsset.swift +47 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/DictionaryInitializable.swift +73 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/DotLottie/DotLottieAnimation.swift +57 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/DotLottie/DotLottieImageProvider.swift +89 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/DotLottie/DotLottieManifest.swift +42 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/DotLottie/DotLottieUtils.swift +71 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Extensions/Bundle.swift +58 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Extensions/KeyedDecodingContainerExtensions.swift +71 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Keyframes/KeyframeData.swift +111 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Keyframes/KeyframeGroup.swift +265 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/LayerEffects/DropShadowEffect.swift +52 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/LayerEffects/EffectValues/ColorEffectValue.swift +45 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/LayerEffects/EffectValues/EffectValue.swift +98 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/LayerEffects/EffectValues/Vector1DEffectValue.swift +45 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/LayerEffects/LayerEffect.swift +103 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/LayerStyles/DropShadowStyle.swift +79 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/LayerStyles/LayerStyle.swift +85 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Layers/ImageLayerModel.swift +49 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Layers/LayerModel.swift +266 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Layers/PreCompLayerModel.swift +74 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Layers/ShapeLayerModel.swift +50 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Layers/SolidLayerModel.swift +63 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Layers/TextLayerModel.swift +65 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Objects/DashPattern.swift +42 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Objects/Marker.swift +35 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Objects/Mask.swift +80 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Objects/Transform.swift +261 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/ShapeItems/Ellipse.swift +79 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/ShapeItems/Fill.swift +79 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/ShapeItems/GradientFill.swift +142 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/ShapeItems/GradientStroke.swift +244 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/ShapeItems/Group.swift +55 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/ShapeItems/Merge.swift +63 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/ShapeItems/Rectangle.swift +79 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/ShapeItems/Repeater.swift +181 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/ShapeItems/RoundedCorners.swift +53 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/ShapeItems/Shape.swift +63 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/ShapeItems/ShapeItem.swift +171 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/ShapeItems/ShapeTransform.swift +202 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/ShapeItems/Star.swift +136 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/ShapeItems/Stroke.swift +144 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/ShapeItems/Trim.swift +90 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Text/Font.swift +67 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Text/Glyph.swift +94 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Text/TextAnimator.swift +240 -0
- package/platforms/macos/src/vendor/Lottie/Private/Model/Text/TextDocument.swift +142 -0
- package/platforms/macos/src/vendor/Lottie/Private/RootAnimationLayer.swift +54 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Debugging/AnimatorNodeDebugging.swift +23 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Debugging/LayerDebugging.swift +231 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Debugging/TestHelpers.swift +10 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Extensions/AnimationKeypathExtension.swift +303 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Extensions/BlendMode+Filter.swift +31 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Extensions/CGColor+RGB.swift +45 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Extensions/CGFloatExtensions.swift +152 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Extensions/DataExtension.swift +33 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Extensions/MathKit.swift +454 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Extensions/StringExtensions.swift +44 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Helpers/AnimationContext.swift +95 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Helpers/AnyEquatable.swift +23 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Helpers/Binding+Map.swift +19 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Helpers/View+ValueChanged.swift +35 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Interpolatable/InterpolatableExtensions.swift +143 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Interpolatable/KeyframeExtensions.swift +47 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Interpolatable/KeyframeInterpolator.swift +250 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/LottieAnimationSource.swift +51 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Primitives/BezierPath.swift +509 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Primitives/BezierPathRoundExtension.swift +163 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Primitives/CGPointExtension.swift +35 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Primitives/ColorExtension.swift +101 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Primitives/CompoundBezierPath.swift +169 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Primitives/CurveVertex.swift +190 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Primitives/PathElement.swift +78 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Primitives/UnitBezier.swift +119 -0
- package/platforms/macos/src/vendor/Lottie/Private/Utility/Primitives/VectorsExtensions.swift +368 -0
- package/platforms/macos/src/vendor/Lottie/Public/Animation/LottieAnimation.swift +179 -0
- package/platforms/macos/src/vendor/Lottie/Public/Animation/LottieAnimationHelpers.swift +317 -0
- package/platforms/macos/src/vendor/Lottie/Public/Animation/LottieAnimationLayer.swift +1582 -0
- package/platforms/macos/src/vendor/Lottie/Public/Animation/LottieAnimationView.swift +1090 -0
- package/platforms/macos/src/vendor/Lottie/Public/Animation/LottieAnimationViewInitializers.swift +226 -0
- package/platforms/macos/src/vendor/Lottie/Public/Animation/LottiePlaybackMode.swift +266 -0
- package/platforms/macos/src/vendor/Lottie/Public/Animation/LottieView.swift +643 -0
- package/platforms/macos/src/vendor/Lottie/Public/AnimationCache/AnimationCacheProvider.swift +21 -0
- package/platforms/macos/src/vendor/Lottie/Public/AnimationCache/DefaultAnimationCache.swift +67 -0
- package/platforms/macos/src/vendor/Lottie/Public/AnimationCache/LRUAnimationCache.swift +11 -0
- package/platforms/macos/src/vendor/Lottie/Public/AnimationCache/LottieAnimationCache.swift +15 -0
- package/platforms/macos/src/vendor/Lottie/Public/Configuration/DecodingStrategy.swift +15 -0
- package/platforms/macos/src/vendor/Lottie/Public/Configuration/LottieConfiguration.swift +54 -0
- package/platforms/macos/src/vendor/Lottie/Public/Configuration/LottieURLSession.swift +31 -0
- package/platforms/macos/src/vendor/Lottie/Public/Configuration/ReducedMotionOption.swift +128 -0
- package/platforms/macos/src/vendor/Lottie/Public/Configuration/RenderingEngineOption.swift +117 -0
- package/platforms/macos/src/vendor/Lottie/Public/Controls/AnimatedButton.swift +128 -0
- package/platforms/macos/src/vendor/Lottie/Public/Controls/AnimatedControl.swift +248 -0
- package/platforms/macos/src/vendor/Lottie/Public/Controls/AnimatedSwitch.swift +271 -0
- package/platforms/macos/src/vendor/Lottie/Public/Controls/LottieButton.swift +119 -0
- package/platforms/macos/src/vendor/Lottie/Public/Controls/LottieSwitch.swift +144 -0
- package/platforms/macos/src/vendor/Lottie/Public/Controls/LottieViewType.swift +79 -0
- package/platforms/macos/src/vendor/Lottie/Public/DotLottie/Cache/DotLottieCache.swift +66 -0
- package/platforms/macos/src/vendor/Lottie/Public/DotLottie/Cache/DotLottieCacheProvider.swift +21 -0
- package/platforms/macos/src/vendor/Lottie/Public/DotLottie/DotLottieConfiguration.swift +72 -0
- package/platforms/macos/src/vendor/Lottie/Public/DotLottie/DotLottieFile.swift +186 -0
- package/platforms/macos/src/vendor/Lottie/Public/DotLottie/DotLottieFileHelpers.swift +386 -0
- package/platforms/macos/src/vendor/Lottie/Public/DynamicProperties/AnimationKeypath.swift +57 -0
- package/platforms/macos/src/vendor/Lottie/Public/DynamicProperties/AnyValueProvider.swift +132 -0
- package/platforms/macos/src/vendor/Lottie/Public/DynamicProperties/ValueProviders/ColorValueProvider.swift +96 -0
- package/platforms/macos/src/vendor/Lottie/Public/DynamicProperties/ValueProviders/FloatValueProvider.swift +81 -0
- package/platforms/macos/src/vendor/Lottie/Public/DynamicProperties/ValueProviders/GradientValueProvider.swift +138 -0
- package/platforms/macos/src/vendor/Lottie/Public/DynamicProperties/ValueProviders/PointValueProvider.swift +81 -0
- package/platforms/macos/src/vendor/Lottie/Public/DynamicProperties/ValueProviders/SizeValueProvider.swift +81 -0
- package/platforms/macos/src/vendor/Lottie/Public/FontProvider/AnimationFontProvider.swift +41 -0
- package/platforms/macos/src/vendor/Lottie/Public/ImageProvider/AnimationImageProvider.swift +43 -0
- package/platforms/macos/src/vendor/Lottie/Public/Keyframes/Interpolatable.swift +285 -0
- package/platforms/macos/src/vendor/Lottie/Public/Keyframes/Keyframe.swift +98 -0
- package/platforms/macos/src/vendor/Lottie/Public/Logging/LottieLogger.swift +138 -0
- package/platforms/macos/src/vendor/Lottie/Public/Primitives/AnimationTime.swift +15 -0
- package/platforms/macos/src/vendor/Lottie/Public/Primitives/LottieColor.swift +43 -0
- package/platforms/macos/src/vendor/Lottie/Public/Primitives/Vectors.swift +36 -0
- package/platforms/macos/src/vendor/Lottie/Public/TextProvider/AnimationTextProvider.swift +135 -0
- package/platforms/macos/src/vendor/Lottie/Public/iOS/AnimationSubview.swift +19 -0
- package/platforms/macos/src/vendor/Lottie/Public/iOS/BundleImageProvider.swift +98 -0
- package/platforms/macos/src/vendor/Lottie/Public/iOS/Compatibility/CompatibleAnimationKeypath.swift +33 -0
- package/platforms/macos/src/vendor/Lottie/Public/iOS/Compatibility/CompatibleAnimationView.swift +567 -0
- package/platforms/macos/src/vendor/Lottie/Public/iOS/Compatibility/CompatibleFontProvider.swift +41 -0
- package/platforms/macos/src/vendor/Lottie/Public/iOS/Compatibility/CompatibleImageProvider.swift +43 -0
- package/platforms/macos/src/vendor/Lottie/Public/iOS/FilepathImageProvider.swift +78 -0
- package/platforms/macos/src/vendor/Lottie/Public/iOS/LottieAnimationViewBase.swift +85 -0
- package/platforms/macos/src/vendor/Lottie/Public/iOS/UIColorExtension.swift +23 -0
- package/platforms/macos/src/vendor/Lottie/Public/macOS/AnimationSubview.macOS.swift +19 -0
- package/platforms/macos/src/vendor/Lottie/Public/macOS/BundleImageProvider.macOS.swift +90 -0
- package/platforms/macos/src/vendor/Lottie/Public/macOS/FilepathImageProvider.macOS.swift +86 -0
- package/platforms/macos/src/vendor/Lottie/Public/macOS/LottieAnimationViewBase.macOS.swift +102 -0
- package/src/Lottie.macos.tsrx +129 -0
- package/src/Lottie.tsrx +162 -0
- package/src/Lottie.web.tsrx +152 -0
- package/src/cx.mobile.ts +8 -0
- package/src/escape-props.ts +65 -0
- package/src/escape-props.web.ts +25 -0
- package/src/index.macos.ts +2 -0
- package/src/index.ts +2 -0
- package/src/index.web.ts +2 -0
- package/src/layout-child.ts +57 -0
- package/src/layout-child.web.ts +108 -0
- package/src/native-elements.d.ts +8 -0
- package/src/props.ts +133 -0
- package/src/references.d.ts +3 -0
- package/src/vendor/ui-lottie/LICENSE.md +21 -0
- package/src/vendor/ui-lottie/src/lottie/index.android.ts +447 -0
- package/src/vendor/ui-lottie/src/lottie/index.common.ts +84 -0
- package/src/vendor/ui-lottie/src/lottie/index.d.ts +133 -0
- package/src/vendor/ui-lottie/src/lottie/index.ios.ts +345 -0
- package/src/vendor/ui-lottie/src/lottie/typings/android.d.ts +4149 -0
- package/src/vendor/ui-lottie/src/lottie/typings/android.nativescript.d.ts +12 -0
- package/src/vendor/ui-lottie/src/lottie/typings/dotlottie.ios.d.ts +14 -0
- package/src/vendor/ui-lottie/src/lottie/typings/ios.d.ts +384 -0
- package/src/vendor/ui-lottie/src/lottie/utils.ts +9 -0
- package/types/generated/.tsrx-typegen-manifest.json +18 -0
- package/types/generated/Lottie.d.ts +7 -0
- package/types/generated/Lottie.web.d.ts +7 -0
- package/types/generated/cx.mobile.d.ts +6 -0
- package/types/generated/escape-props.d.ts +15 -0
- package/types/generated/escape-props.web.d.ts +5 -0
- package/types/generated/index.d.ts +2 -0
- package/types/generated/index.web.d.ts +2 -0
- package/types/generated/layout-child.d.ts +6 -0
- package/types/generated/layout-child.web.d.ts +15 -0
- package/types/generated/props.d.ts +110 -0
- package/types/generated/vendor/ui-lottie/src/lottie/index.common.d.ts +30 -0
- package/types/generated/vendor/ui-lottie/src/lottie/index.ios.d.ts +35 -0
- package/types/generated/vendor/ui-lottie/src/lottie/utils.d.ts +1 -0
- package/index.d.ts +0 -1
- package/index.js +0 -2
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Star.swift
|
|
3
|
+
// lottie-swift
|
|
4
|
+
//
|
|
5
|
+
// Created by Brandon Withrow on 1/8/19.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
// MARK: - StarType
|
|
9
|
+
|
|
10
|
+
enum StarType: Int, Codable, Sendable {
|
|
11
|
+
case none
|
|
12
|
+
case star
|
|
13
|
+
case polygon
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// MARK: - Star
|
|
17
|
+
|
|
18
|
+
final class Star: ShapeItem {
|
|
19
|
+
|
|
20
|
+
// MARK: Lifecycle
|
|
21
|
+
|
|
22
|
+
required init(from decoder: Decoder) throws {
|
|
23
|
+
let container = try decoder.container(keyedBy: Star.CodingKeys.self)
|
|
24
|
+
direction = try container.decodeIfPresent(PathDirection.self, forKey: .direction) ?? .clockwise
|
|
25
|
+
position = try container.decode(KeyframeGroup<LottieVector3D>.self, forKey: .position)
|
|
26
|
+
outerRadius = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .outerRadius)
|
|
27
|
+
outerRoundness = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .outerRoundness)
|
|
28
|
+
innerRadius = try container.decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .innerRadius)
|
|
29
|
+
innerRoundness = try container.decodeIfPresent(KeyframeGroup<LottieVector1D>.self, forKey: .innerRoundness)
|
|
30
|
+
rotation = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .rotation)
|
|
31
|
+
points = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .points)
|
|
32
|
+
starType = try container.decode(StarType.self, forKey: .starType)
|
|
33
|
+
try super.init(from: decoder)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
required init(dictionary: [String: Any]) throws {
|
|
37
|
+
if
|
|
38
|
+
let directionRawValue = dictionary[CodingKeys.direction.rawValue] as? Int,
|
|
39
|
+
let direction = PathDirection(rawValue: directionRawValue)
|
|
40
|
+
{
|
|
41
|
+
self.direction = direction
|
|
42
|
+
} else {
|
|
43
|
+
direction = .clockwise
|
|
44
|
+
}
|
|
45
|
+
let positionDictionary: [String: Any] = try dictionary.value(for: CodingKeys.position)
|
|
46
|
+
position = try KeyframeGroup<LottieVector3D>(dictionary: positionDictionary)
|
|
47
|
+
let outerRadiusDictionary: [String: Any] = try dictionary.value(for: CodingKeys.outerRadius)
|
|
48
|
+
outerRadius = try KeyframeGroup<LottieVector1D>(dictionary: outerRadiusDictionary)
|
|
49
|
+
let outerRoundnessDictionary: [String: Any] = try dictionary.value(for: CodingKeys.outerRoundness)
|
|
50
|
+
outerRoundness = try KeyframeGroup<LottieVector1D>(dictionary: outerRoundnessDictionary)
|
|
51
|
+
if let innerRadiusDictionary = dictionary[CodingKeys.innerRadius.rawValue] as? [String: Any] {
|
|
52
|
+
innerRadius = try KeyframeGroup<LottieVector1D>(dictionary: innerRadiusDictionary)
|
|
53
|
+
} else {
|
|
54
|
+
innerRadius = nil
|
|
55
|
+
}
|
|
56
|
+
if let innerRoundnessDictionary = dictionary[CodingKeys.innerRoundness.rawValue] as? [String: Any] {
|
|
57
|
+
innerRoundness = try KeyframeGroup<LottieVector1D>(dictionary: innerRoundnessDictionary)
|
|
58
|
+
} else {
|
|
59
|
+
innerRoundness = nil
|
|
60
|
+
}
|
|
61
|
+
let rotationDictionary: [String: Any] = try dictionary.value(for: CodingKeys.rotation)
|
|
62
|
+
rotation = try KeyframeGroup<LottieVector1D>(dictionary: rotationDictionary)
|
|
63
|
+
let pointsDictionary: [String: Any] = try dictionary.value(for: CodingKeys.points)
|
|
64
|
+
points = try KeyframeGroup<LottieVector1D>(dictionary: pointsDictionary)
|
|
65
|
+
let starTypeRawValue: Int = try dictionary.value(for: CodingKeys.starType)
|
|
66
|
+
guard let starType = StarType(rawValue: starTypeRawValue) else {
|
|
67
|
+
throw InitializableError.invalidInput()
|
|
68
|
+
}
|
|
69
|
+
self.starType = starType
|
|
70
|
+
try super.init(dictionary: dictionary)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// MARK: Internal
|
|
74
|
+
|
|
75
|
+
/// The direction of the star.
|
|
76
|
+
let direction: PathDirection
|
|
77
|
+
|
|
78
|
+
/// The position of the star
|
|
79
|
+
let position: KeyframeGroup<LottieVector3D>
|
|
80
|
+
|
|
81
|
+
/// The outer radius of the star
|
|
82
|
+
let outerRadius: KeyframeGroup<LottieVector1D>
|
|
83
|
+
|
|
84
|
+
/// The outer roundness of the star
|
|
85
|
+
let outerRoundness: KeyframeGroup<LottieVector1D>
|
|
86
|
+
|
|
87
|
+
/// The outer radius of the star
|
|
88
|
+
let innerRadius: KeyframeGroup<LottieVector1D>?
|
|
89
|
+
|
|
90
|
+
/// The outer roundness of the star
|
|
91
|
+
let innerRoundness: KeyframeGroup<LottieVector1D>?
|
|
92
|
+
|
|
93
|
+
/// The rotation of the star
|
|
94
|
+
let rotation: KeyframeGroup<LottieVector1D>
|
|
95
|
+
|
|
96
|
+
/// The number of points on the star
|
|
97
|
+
let points: KeyframeGroup<LottieVector1D>
|
|
98
|
+
|
|
99
|
+
/// The type of star
|
|
100
|
+
let starType: StarType
|
|
101
|
+
|
|
102
|
+
override func encode(to encoder: Encoder) throws {
|
|
103
|
+
try super.encode(to: encoder)
|
|
104
|
+
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
105
|
+
try container.encode(direction, forKey: .direction)
|
|
106
|
+
try container.encode(position, forKey: .position)
|
|
107
|
+
try container.encode(outerRadius, forKey: .outerRadius)
|
|
108
|
+
try container.encode(outerRoundness, forKey: .outerRoundness)
|
|
109
|
+
try container.encode(innerRadius, forKey: .innerRadius)
|
|
110
|
+
try container.encode(innerRoundness, forKey: .innerRoundness)
|
|
111
|
+
try container.encode(rotation, forKey: .rotation)
|
|
112
|
+
try container.encode(points, forKey: .points)
|
|
113
|
+
try container.encode(starType, forKey: .starType)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// MARK: Private
|
|
117
|
+
|
|
118
|
+
private enum CodingKeys: String, CodingKey {
|
|
119
|
+
case direction = "d"
|
|
120
|
+
case position = "p"
|
|
121
|
+
case outerRadius = "or"
|
|
122
|
+
case outerRoundness = "os"
|
|
123
|
+
case innerRadius = "ir"
|
|
124
|
+
case innerRoundness = "is"
|
|
125
|
+
case rotation = "r"
|
|
126
|
+
case points = "pt"
|
|
127
|
+
case starType = "sy"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// MARK: @unchecked Sendable
|
|
132
|
+
|
|
133
|
+
/// `Star` inherits `@unchecked Sendable` from `ShapeItem` and
|
|
134
|
+
/// we need to restate that here to avoid a warning in Xcode 16
|
|
135
|
+
// swiftlint:disable:next no_unchecked_sendable
|
|
136
|
+
extension Star: @unchecked Sendable { }
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Stroke.swift
|
|
3
|
+
// lottie-swift
|
|
4
|
+
//
|
|
5
|
+
// Created by Brandon Withrow on 1/8/19.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
// MARK: - Stroke
|
|
9
|
+
|
|
10
|
+
final class Stroke: ShapeItem {
|
|
11
|
+
|
|
12
|
+
// MARK: Lifecycle
|
|
13
|
+
|
|
14
|
+
required init(from decoder: Decoder) throws {
|
|
15
|
+
let container = try decoder.container(keyedBy: Stroke.CodingKeys.self)
|
|
16
|
+
opacity = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .opacity)
|
|
17
|
+
color = try container.decode(KeyframeGroup<LottieColor>.self, forKey: .color)
|
|
18
|
+
width = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .width)
|
|
19
|
+
lineCap = try container.decodeIfPresent(LineCap.self, forKey: .lineCap) ?? .round
|
|
20
|
+
lineJoin = try container.decodeIfPresent(LineJoin.self, forKey: .lineJoin) ?? .round
|
|
21
|
+
miterLimit = try container.decodeIfPresent(Double.self, forKey: .miterLimit) ?? 4
|
|
22
|
+
dashPattern = try container.decodeIfPresent([DashElement].self, forKey: .dashPattern)
|
|
23
|
+
try super.init(from: decoder)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
required init(dictionary: [String: Any]) throws {
|
|
27
|
+
let opacityDictionary: [String: Any] = try dictionary.value(for: CodingKeys.opacity)
|
|
28
|
+
opacity = try KeyframeGroup<LottieVector1D>(dictionary: opacityDictionary)
|
|
29
|
+
let colorDictionary: [String: Any] = try dictionary.value(for: CodingKeys.color)
|
|
30
|
+
color = try KeyframeGroup<LottieColor>(dictionary: colorDictionary)
|
|
31
|
+
let widthDictionary: [String: Any] = try dictionary.value(for: CodingKeys.width)
|
|
32
|
+
width = try KeyframeGroup<LottieVector1D>(dictionary: widthDictionary)
|
|
33
|
+
if
|
|
34
|
+
let lineCapRawValue = dictionary[CodingKeys.lineCap.rawValue] as? Int,
|
|
35
|
+
let lineCap = LineCap(rawValue: lineCapRawValue)
|
|
36
|
+
{
|
|
37
|
+
self.lineCap = lineCap
|
|
38
|
+
} else {
|
|
39
|
+
lineCap = .round
|
|
40
|
+
}
|
|
41
|
+
if
|
|
42
|
+
let lineJoinRawValue = dictionary[CodingKeys.lineJoin.rawValue] as? Int,
|
|
43
|
+
let lineJoin = LineJoin(rawValue: lineJoinRawValue)
|
|
44
|
+
{
|
|
45
|
+
self.lineJoin = lineJoin
|
|
46
|
+
} else {
|
|
47
|
+
lineJoin = .round
|
|
48
|
+
}
|
|
49
|
+
miterLimit = (try? dictionary.value(for: CodingKeys.miterLimit)) ?? 4
|
|
50
|
+
let dashPatternDictionaries = dictionary[CodingKeys.dashPattern.rawValue] as? [[String: Any]]
|
|
51
|
+
dashPattern = try? dashPatternDictionaries?.map { try DashElement(dictionary: $0) }
|
|
52
|
+
try super.init(dictionary: dictionary)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
init(
|
|
56
|
+
name: String,
|
|
57
|
+
hidden: Bool,
|
|
58
|
+
opacity: KeyframeGroup<LottieVector1D>,
|
|
59
|
+
color: KeyframeGroup<LottieColor>,
|
|
60
|
+
width: KeyframeGroup<LottieVector1D>,
|
|
61
|
+
lineCap: LineCap,
|
|
62
|
+
lineJoin: LineJoin,
|
|
63
|
+
miterLimit: Double,
|
|
64
|
+
dashPattern: [DashElement]?
|
|
65
|
+
) {
|
|
66
|
+
self.opacity = opacity
|
|
67
|
+
self.color = color
|
|
68
|
+
self.width = width
|
|
69
|
+
self.lineCap = lineCap
|
|
70
|
+
self.lineJoin = lineJoin
|
|
71
|
+
self.miterLimit = miterLimit
|
|
72
|
+
self.dashPattern = dashPattern
|
|
73
|
+
super.init(name: name, type: .stroke, hidden: hidden)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// MARK: Internal
|
|
77
|
+
|
|
78
|
+
/// The opacity of the stroke
|
|
79
|
+
let opacity: KeyframeGroup<LottieVector1D>
|
|
80
|
+
|
|
81
|
+
/// The Color of the stroke
|
|
82
|
+
let color: KeyframeGroup<LottieColor>
|
|
83
|
+
|
|
84
|
+
/// The width of the stroke
|
|
85
|
+
let width: KeyframeGroup<LottieVector1D>
|
|
86
|
+
|
|
87
|
+
/// Line Cap
|
|
88
|
+
let lineCap: LineCap
|
|
89
|
+
|
|
90
|
+
/// Line Join
|
|
91
|
+
let lineJoin: LineJoin
|
|
92
|
+
|
|
93
|
+
/// Miter Limit
|
|
94
|
+
let miterLimit: Double
|
|
95
|
+
|
|
96
|
+
/// The dash pattern of the stroke
|
|
97
|
+
let dashPattern: [DashElement]?
|
|
98
|
+
|
|
99
|
+
/// Creates a copy of this Stroke with the given updated width keyframes
|
|
100
|
+
func copy(width newWidth: KeyframeGroup<LottieVector1D>) -> Stroke {
|
|
101
|
+
Stroke(
|
|
102
|
+
name: name,
|
|
103
|
+
hidden: hidden,
|
|
104
|
+
opacity: opacity,
|
|
105
|
+
color: color,
|
|
106
|
+
width: newWidth,
|
|
107
|
+
lineCap: lineCap,
|
|
108
|
+
lineJoin: lineJoin,
|
|
109
|
+
miterLimit: miterLimit,
|
|
110
|
+
dashPattern: dashPattern
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
override func encode(to encoder: Encoder) throws {
|
|
115
|
+
try super.encode(to: encoder)
|
|
116
|
+
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
117
|
+
try container.encode(opacity, forKey: .opacity)
|
|
118
|
+
try container.encode(color, forKey: .color)
|
|
119
|
+
try container.encode(width, forKey: .width)
|
|
120
|
+
try container.encode(lineCap, forKey: .lineCap)
|
|
121
|
+
try container.encode(lineJoin, forKey: .lineJoin)
|
|
122
|
+
try container.encode(miterLimit, forKey: .miterLimit)
|
|
123
|
+
try container.encodeIfPresent(dashPattern, forKey: .dashPattern)
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// MARK: Private
|
|
127
|
+
|
|
128
|
+
private enum CodingKeys: String, CodingKey {
|
|
129
|
+
case opacity = "o"
|
|
130
|
+
case color = "c"
|
|
131
|
+
case width = "w"
|
|
132
|
+
case lineCap = "lc"
|
|
133
|
+
case lineJoin = "lj"
|
|
134
|
+
case miterLimit = "ml"
|
|
135
|
+
case dashPattern = "d"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// MARK: @unchecked Sendable
|
|
140
|
+
|
|
141
|
+
/// `Stroke` inherits `@unchecked Sendable` from `ShapeItem` and
|
|
142
|
+
/// we need to restate that here to avoid a warning in Xcode 16
|
|
143
|
+
// swiftlint:disable:next no_unchecked_sendable
|
|
144
|
+
extension Stroke: @unchecked Sendable { }
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Trim.swift
|
|
3
|
+
// lottie-swift
|
|
4
|
+
//
|
|
5
|
+
// Created by Brandon Withrow on 1/8/19.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
// MARK: - TrimType
|
|
9
|
+
|
|
10
|
+
enum TrimType: Int, Codable {
|
|
11
|
+
case simultaneously = 1
|
|
12
|
+
case individually = 2
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// MARK: - Trim
|
|
16
|
+
|
|
17
|
+
final class Trim: ShapeItem {
|
|
18
|
+
|
|
19
|
+
// MARK: Lifecycle
|
|
20
|
+
|
|
21
|
+
required init(from decoder: Decoder) throws {
|
|
22
|
+
let container = try decoder.container(keyedBy: Trim.CodingKeys.self)
|
|
23
|
+
start = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .start)
|
|
24
|
+
end = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .end)
|
|
25
|
+
offset = try container.decode(KeyframeGroup<LottieVector1D>.self, forKey: .offset)
|
|
26
|
+
trimType = try container.decodeIfPresent(TrimType.self, forKey: .trimType) ?? .individually
|
|
27
|
+
try super.init(from: decoder)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
required init(dictionary: [String: Any]) throws {
|
|
31
|
+
let startDictionary: [String: Any] = try dictionary.value(for: CodingKeys.start)
|
|
32
|
+
start = try KeyframeGroup<LottieVector1D>(dictionary: startDictionary)
|
|
33
|
+
let endDictionary: [String: Any] = try dictionary.value(for: CodingKeys.end)
|
|
34
|
+
end = try KeyframeGroup<LottieVector1D>(dictionary: endDictionary)
|
|
35
|
+
let offsetDictionary: [String: Any] = try dictionary.value(for: CodingKeys.offset)
|
|
36
|
+
offset = try KeyframeGroup<LottieVector1D>(dictionary: offsetDictionary)
|
|
37
|
+
let trimTypeRawValue: Int = try dictionary.value(for: CodingKeys.trimType) ?? TrimType.individually.rawValue
|
|
38
|
+
guard let trimType = TrimType(rawValue: trimTypeRawValue) else {
|
|
39
|
+
throw InitializableError.invalidInput()
|
|
40
|
+
}
|
|
41
|
+
self.trimType = trimType
|
|
42
|
+
try super.init(dictionary: dictionary)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// MARK: Internal
|
|
46
|
+
|
|
47
|
+
/// The start of the trim
|
|
48
|
+
let start: KeyframeGroup<LottieVector1D>
|
|
49
|
+
|
|
50
|
+
/// The end of the trim
|
|
51
|
+
let end: KeyframeGroup<LottieVector1D>
|
|
52
|
+
|
|
53
|
+
/// The offset of the trim
|
|
54
|
+
let offset: KeyframeGroup<LottieVector1D>
|
|
55
|
+
|
|
56
|
+
let trimType: TrimType
|
|
57
|
+
|
|
58
|
+
/// If this trim doesn't affect the path at all then we can consider it empty
|
|
59
|
+
var isEmpty: Bool {
|
|
60
|
+
start.keyframes.count == 1
|
|
61
|
+
&& start.keyframes[0].value.value == 0
|
|
62
|
+
&& end.keyframes.count == 1
|
|
63
|
+
&& end.keyframes[0].value.value == 100
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
override func encode(to encoder: Encoder) throws {
|
|
67
|
+
try super.encode(to: encoder)
|
|
68
|
+
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
69
|
+
try container.encode(start, forKey: .start)
|
|
70
|
+
try container.encode(end, forKey: .end)
|
|
71
|
+
try container.encode(offset, forKey: .offset)
|
|
72
|
+
try container.encode(trimType, forKey: .trimType)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// MARK: Private
|
|
76
|
+
|
|
77
|
+
private enum CodingKeys: String, CodingKey {
|
|
78
|
+
case start = "s"
|
|
79
|
+
case end = "e"
|
|
80
|
+
case offset = "o"
|
|
81
|
+
case trimType = "m"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// MARK: @unchecked Sendable
|
|
86
|
+
|
|
87
|
+
/// `Trim` inherits `@unchecked Sendable` from `ShapeItem` and
|
|
88
|
+
/// we need to restate that here to avoid a warning in Xcode 16
|
|
89
|
+
// swiftlint:disable:next no_unchecked_sendable
|
|
90
|
+
extension Trim: @unchecked Sendable { }
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Font.swift
|
|
3
|
+
// lottie-swift
|
|
4
|
+
//
|
|
5
|
+
// Created by Brandon Withrow on 1/9/19.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
// MARK: - Font
|
|
9
|
+
|
|
10
|
+
final class Font: Codable, Sendable, DictionaryInitializable {
|
|
11
|
+
|
|
12
|
+
// MARK: Lifecycle
|
|
13
|
+
|
|
14
|
+
required init(from decoder: Decoder) throws {
|
|
15
|
+
let container = try decoder.container(keyedBy: CodingKeys.self)
|
|
16
|
+
name = try container.decode(String.self, forKey: .name)
|
|
17
|
+
familyName = try container.decode(String.self, forKey: .familyName)
|
|
18
|
+
style = try container.decode(String.self, forKey: .style)
|
|
19
|
+
ascent = try container.decodeIfPresent(Double.self, forKey: .ascent) ?? 0
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
init(dictionary: [String: Any]) throws {
|
|
23
|
+
name = try dictionary.value(for: CodingKeys.name)
|
|
24
|
+
familyName = try dictionary.value(for: CodingKeys.familyName)
|
|
25
|
+
style = try dictionary.value(for: CodingKeys.style)
|
|
26
|
+
ascent = (try? dictionary.value(for: CodingKeys.ascent)) ?? 0
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// MARK: Internal
|
|
30
|
+
|
|
31
|
+
let name: String
|
|
32
|
+
let familyName: String
|
|
33
|
+
let style: String
|
|
34
|
+
let ascent: Double
|
|
35
|
+
|
|
36
|
+
// MARK: Private
|
|
37
|
+
|
|
38
|
+
private enum CodingKeys: String, CodingKey {
|
|
39
|
+
case name = "fName"
|
|
40
|
+
case familyName = "fFamily"
|
|
41
|
+
case style = "fStyle"
|
|
42
|
+
case ascent
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// MARK: - FontList
|
|
48
|
+
|
|
49
|
+
/// A list of fonts
|
|
50
|
+
final class FontList: Codable, Sendable, DictionaryInitializable {
|
|
51
|
+
|
|
52
|
+
// MARK: Lifecycle
|
|
53
|
+
|
|
54
|
+
init(dictionary: [String: Any]) throws {
|
|
55
|
+
let fontDictionaries: [[String: Any]] = try dictionary.value(for: CodingKeys.fonts)
|
|
56
|
+
fonts = try fontDictionaries.map { try Font(dictionary: $0) }
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// MARK: Internal
|
|
60
|
+
|
|
61
|
+
enum CodingKeys: String, CodingKey {
|
|
62
|
+
case fonts = "list"
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
let fonts: [Font]
|
|
66
|
+
|
|
67
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Glyph.swift
|
|
3
|
+
// lottie-swift
|
|
4
|
+
//
|
|
5
|
+
// Created by Brandon Withrow on 1/9/19.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
/// A model that holds a vector character
|
|
9
|
+
final class Glyph: Codable, Sendable, DictionaryInitializable {
|
|
10
|
+
|
|
11
|
+
// MARK: Lifecycle
|
|
12
|
+
|
|
13
|
+
required init(from decoder: Decoder) throws {
|
|
14
|
+
let container = try decoder.container(keyedBy: Glyph.CodingKeys.self)
|
|
15
|
+
character = try container.decode(String.self, forKey: .character)
|
|
16
|
+
fontSize = try container.decode(Double.self, forKey: .fontSize)
|
|
17
|
+
fontFamily = try container.decode(String.self, forKey: .fontFamily)
|
|
18
|
+
fontStyle = try container.decode(String.self, forKey: .fontStyle)
|
|
19
|
+
width = try container.decode(Double.self, forKey: .width)
|
|
20
|
+
if
|
|
21
|
+
container.contains(.shapeWrapper),
|
|
22
|
+
let shapeContainer = try? container.nestedContainer(keyedBy: ShapeKey.self, forKey: .shapeWrapper),
|
|
23
|
+
shapeContainer.contains(.shapes)
|
|
24
|
+
{
|
|
25
|
+
shapes = try shapeContainer.decode([ShapeItem].self, ofFamily: ShapeType.self, forKey: .shapes)
|
|
26
|
+
} else {
|
|
27
|
+
shapes = []
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
init(dictionary: [String: Any]) throws {
|
|
32
|
+
character = try dictionary.value(for: CodingKeys.character)
|
|
33
|
+
fontSize = try dictionary.value(for: CodingKeys.fontSize)
|
|
34
|
+
fontFamily = try dictionary.value(for: CodingKeys.fontFamily)
|
|
35
|
+
fontStyle = try dictionary.value(for: CodingKeys.fontStyle)
|
|
36
|
+
width = try dictionary.value(for: CodingKeys.width)
|
|
37
|
+
if
|
|
38
|
+
let shapes = dictionary[CodingKeys.shapeWrapper.rawValue] as? [String: Any],
|
|
39
|
+
let shapeDictionaries = shapes[ShapeKey.shapes.rawValue] as? [[String: Any]]
|
|
40
|
+
{
|
|
41
|
+
self.shapes = try [ShapeItem].fromDictionaries(shapeDictionaries)
|
|
42
|
+
} else {
|
|
43
|
+
shapes = [ShapeItem]()
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// MARK: Internal
|
|
48
|
+
|
|
49
|
+
/// The character
|
|
50
|
+
let character: String
|
|
51
|
+
|
|
52
|
+
/// The font size of the character
|
|
53
|
+
let fontSize: Double
|
|
54
|
+
|
|
55
|
+
/// The font family of the character
|
|
56
|
+
let fontFamily: String
|
|
57
|
+
|
|
58
|
+
/// The Style of the character
|
|
59
|
+
let fontStyle: String
|
|
60
|
+
|
|
61
|
+
/// The Width of the character
|
|
62
|
+
let width: Double
|
|
63
|
+
|
|
64
|
+
/// The Shape Data of the Character
|
|
65
|
+
let shapes: [ShapeItem]
|
|
66
|
+
|
|
67
|
+
func encode(to encoder: Encoder) throws {
|
|
68
|
+
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
69
|
+
|
|
70
|
+
try container.encode(character, forKey: .character)
|
|
71
|
+
try container.encode(fontSize, forKey: .fontSize)
|
|
72
|
+
try container.encode(fontFamily, forKey: .fontFamily)
|
|
73
|
+
try container.encode(fontStyle, forKey: .fontStyle)
|
|
74
|
+
try container.encode(width, forKey: .width)
|
|
75
|
+
|
|
76
|
+
var shapeContainer = container.nestedContainer(keyedBy: ShapeKey.self, forKey: .shapeWrapper)
|
|
77
|
+
try shapeContainer.encode(shapes, forKey: .shapes)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// MARK: Private
|
|
81
|
+
|
|
82
|
+
private enum CodingKeys: String, CodingKey {
|
|
83
|
+
case character = "ch"
|
|
84
|
+
case fontSize = "size"
|
|
85
|
+
case fontFamily = "fFamily"
|
|
86
|
+
case fontStyle = "style"
|
|
87
|
+
case width = "w"
|
|
88
|
+
case shapeWrapper = "data"
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
private enum ShapeKey: String, CodingKey {
|
|
92
|
+
case shapes
|
|
93
|
+
}
|
|
94
|
+
}
|