@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,214 @@
|
|
|
1
|
+
import { LottieViewBase, autoPlayProperty, keyPathColorsProperty, loopProperty, progressProperty, srcProperty, stretchProperty } from "./src/lottie/index.common.js";
|
|
2
|
+
import { clamp } from "./src/lottie/utils.js";
|
|
3
|
+
import { Color, Http, Utils, View, knownFolders, path } from "@nativescript/core";
|
|
4
|
+
//#region src/vendor/ui-lottie/src/lottie/index.ios.ts
|
|
5
|
+
/**********************************************************************************
|
|
6
|
+
* (c) 2017, Nathan Walker.
|
|
7
|
+
* Licensed under the MIT license.
|
|
8
|
+
*
|
|
9
|
+
* Version 1.0.0 walkerrunpdx@gmail.com
|
|
10
|
+
**********************************************************************************/
|
|
11
|
+
var appPath = knownFolders.currentApp().path;
|
|
12
|
+
CompatibleLottieLogger.overrideLottieLogger();
|
|
13
|
+
var LottieView = class LottieView extends LottieViewBase {
|
|
14
|
+
constructor(..._args) {
|
|
15
|
+
super(..._args);
|
|
16
|
+
this._imageSourceAffectsLayout = true;
|
|
17
|
+
}
|
|
18
|
+
createNativeView() {
|
|
19
|
+
return CompatibleAnimationView.new();
|
|
20
|
+
}
|
|
21
|
+
initNativeView() {
|
|
22
|
+
super.initNativeView();
|
|
23
|
+
this.nativeViewProtected.translatesAutoresizingMaskIntoConstraints = true;
|
|
24
|
+
}
|
|
25
|
+
onLoaded() {
|
|
26
|
+
super.onLoaded();
|
|
27
|
+
if (this.autoPlay && !this.isAnimating()) this.playAnimation();
|
|
28
|
+
}
|
|
29
|
+
[keyPathColorsProperty.setNative](value) {
|
|
30
|
+
Object.keys(value).forEach((k) => this.setColor(value[k], k.split("|")));
|
|
31
|
+
}
|
|
32
|
+
[srcProperty.setNative](src) {
|
|
33
|
+
try {
|
|
34
|
+
if (!src) this.nativeViewProtected.compatibleAnimation = null;
|
|
35
|
+
else if (src[0] === "{") this.nativeViewProtected.compatibleAnimation = CompatibleAnimation.alloc().initWithJson(src);
|
|
36
|
+
else if (src.startsWith(Utils.RESOURCE_PREFIX)) {
|
|
37
|
+
const resName = src.replace(Utils.RESOURCE_PREFIX, "");
|
|
38
|
+
this.nativeViewProtected.compatibleAnimation = CompatibleAnimation.alloc().initWithNameBundle(resName.replace(".json", "").replace(".lottie", ""), NSBundle.mainBundle);
|
|
39
|
+
} else if (/^https?:/i.test(src)) {
|
|
40
|
+
const match = /\.(zip|lottie|json)(?=[?#]|$)/i.exec(src);
|
|
41
|
+
const dest = path.join(knownFolders.temp().path, `lottie-${Date.now()}${match ? match[0].toLowerCase() : ".json"}`);
|
|
42
|
+
Http.getFile(src, dest).then(() => {
|
|
43
|
+
this.src = dest;
|
|
44
|
+
}).catch((error) => {
|
|
45
|
+
console.error(error);
|
|
46
|
+
this.notify({
|
|
47
|
+
eventName: "loadFailed",
|
|
48
|
+
error
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
} else {
|
|
52
|
+
if (src[0] === "~") src = `${path.join(appPath, src.substring(2))}`;
|
|
53
|
+
if (!/.(json|zip|lottie)$/.test(src)) src += ".json";
|
|
54
|
+
if (!src.startsWith("file:/") && src[0] !== "/") this.nativeViewProtected.compatibleAnimation = CompatibleAnimation.alloc().initWithNameSubdirectoryBundle(src.replace(".json", "").replace(".lottie", ""), null, NSBundle.mainBundle);
|
|
55
|
+
else this.nativeViewProtected.compatibleAnimation = CompatibleAnimation.alloc().initWithFilepath(src);
|
|
56
|
+
}
|
|
57
|
+
if (this.keyPathColors) this[keyPathColorsProperty.setNative](this.keyPathColors);
|
|
58
|
+
if (this._imageSourceAffectsLayout) this.requestLayout();
|
|
59
|
+
if (this.autoPlay && !this.isAnimating()) this.playAnimation();
|
|
60
|
+
if (src && !/^https?:/i.test(src)) {
|
|
61
|
+
const view = this.nativeViewProtected;
|
|
62
|
+
setTimeout(() => {
|
|
63
|
+
if (view && view.compatibleAnimation && view.animationDuration >= 0) this.notify({
|
|
64
|
+
eventName: LottieViewBase.compositionLoadedEvent,
|
|
65
|
+
composition: view.compatibleAnimation
|
|
66
|
+
});
|
|
67
|
+
else this.notify({
|
|
68
|
+
eventName: LottieViewBase.loadFailedEvent,
|
|
69
|
+
error: src
|
|
70
|
+
});
|
|
71
|
+
}, 0);
|
|
72
|
+
}
|
|
73
|
+
} catch (error) {
|
|
74
|
+
console.error(error);
|
|
75
|
+
this.notify({
|
|
76
|
+
eventName: LottieViewBase.loadFailedEvent,
|
|
77
|
+
error
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
[loopProperty.setNative](loop) {
|
|
82
|
+
this.nativeViewProtected.loopAnimationCount = loop ? -1 : 0;
|
|
83
|
+
}
|
|
84
|
+
[autoPlayProperty.setNative](autoPlay) {
|
|
85
|
+
if (autoPlay) {
|
|
86
|
+
if (!this.isAnimating()) this.playAnimation();
|
|
87
|
+
} else if (this.isAnimating()) this.cancelAnimation();
|
|
88
|
+
}
|
|
89
|
+
setColor(value, keyPath) {
|
|
90
|
+
if (this.nativeView && value && keyPath && keyPath.length) {
|
|
91
|
+
if (keyPath[keyPath.length - 1].toLowerCase() !== "color") {
|
|
92
|
+
keyPath = [...keyPath];
|
|
93
|
+
keyPath.push("Color");
|
|
94
|
+
}
|
|
95
|
+
const color = value instanceof Color ? value : new Color(value);
|
|
96
|
+
this.nativeViewProtected.setColorValueForKeypath(color.ios, CompatibleAnimationKeypath.alloc().initWithKeypath(keyPath.join(".")));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
setOpacity(value, keyPath) {
|
|
100
|
+
if (this.nativeView && value != null && keyPath && keyPath.length) {
|
|
101
|
+
keyPath = [...keyPath];
|
|
102
|
+
if (keyPath[keyPath.length - 1].toLowerCase() !== "opacity") keyPath.push("Opacity");
|
|
103
|
+
this.nativeViewProtected.setFloatValueForKeypath(clamp(value) * 100, CompatibleAnimationKeypath.alloc().initWithKeypath(keyPath.join(".")));
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
playAnimation() {
|
|
107
|
+
setTimeout(() => {
|
|
108
|
+
if (this.nativeViewProtected) {
|
|
109
|
+
if (this.completionBlock) this.nativeViewProtected.playWithCompletion((animationFinished) => {
|
|
110
|
+
if (this.completionBlock) this.completionBlock(animationFinished);
|
|
111
|
+
});
|
|
112
|
+
else this.nativeViewProtected.play();
|
|
113
|
+
}
|
|
114
|
+
}, 0);
|
|
115
|
+
}
|
|
116
|
+
playAnimationFromProgressToProgress(startProgress, endProgress) {
|
|
117
|
+
if (this.nativeViewProtected) {
|
|
118
|
+
startProgress = startProgress ? clamp(startProgress) : 0;
|
|
119
|
+
endProgress = endProgress ? clamp(endProgress) : 1;
|
|
120
|
+
if (this.completionBlock) this.nativeViewProtected.playFromProgressToProgressCompletion(startProgress, endProgress, this.completionBlock);
|
|
121
|
+
else this.nativeViewProtected.playFromProgressToProgressCompletion(startProgress, endProgress, null);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
cancelAnimation() {
|
|
125
|
+
if (this.nativeViewProtected) this.nativeViewProtected.pause();
|
|
126
|
+
}
|
|
127
|
+
pauseAnimation() {
|
|
128
|
+
if (this.nativeViewProtected) this.nativeViewProtected.pause();
|
|
129
|
+
}
|
|
130
|
+
resumeAnimation() {
|
|
131
|
+
if (this.nativeViewProtected) this.nativeViewProtected.play();
|
|
132
|
+
}
|
|
133
|
+
isAnimating() {
|
|
134
|
+
return this.nativeView ? this.nativeViewProtected.isAnimationPlaying : false;
|
|
135
|
+
}
|
|
136
|
+
[progressProperty.setNative](value) {
|
|
137
|
+
this.nativeViewProtected.currentProgress = value;
|
|
138
|
+
}
|
|
139
|
+
set speed(value) {
|
|
140
|
+
if (this.nativeView && value) this.nativeViewProtected.animationSpeed = value;
|
|
141
|
+
}
|
|
142
|
+
get speed() {
|
|
143
|
+
return this.nativeView ? this.nativeViewProtected.animationSpeed : void 0;
|
|
144
|
+
}
|
|
145
|
+
get duration() {
|
|
146
|
+
return this.nativeView && this.nativeViewProtected.animationDuration;
|
|
147
|
+
}
|
|
148
|
+
set contentMode(mode) {
|
|
149
|
+
if (this.nativeViewProtected) this.nativeViewProtected.contentMode = mode;
|
|
150
|
+
}
|
|
151
|
+
onMeasure(widthMeasureSpec, heightMeasureSpec) {
|
|
152
|
+
const intrinsicContentSize = this.nativeViewProtected.intrinsicContentSize;
|
|
153
|
+
const width = Utils.layout.getMeasureSpecSize(widthMeasureSpec);
|
|
154
|
+
const widthMode = Utils.layout.getMeasureSpecMode(widthMeasureSpec);
|
|
155
|
+
const height = Utils.layout.getMeasureSpecSize(heightMeasureSpec);
|
|
156
|
+
const heightMode = Utils.layout.getMeasureSpecMode(heightMeasureSpec);
|
|
157
|
+
const nativeWidth = intrinsicContentSize ? Utils.layout.toDevicePixels(intrinsicContentSize.width) : 0;
|
|
158
|
+
const nativeHeight = intrinsicContentSize ? Utils.layout.toDevicePixels(intrinsicContentSize.height) : 0;
|
|
159
|
+
let measureWidth = Math.max(nativeWidth, this.effectiveMinWidth);
|
|
160
|
+
let measureHeight = Math.max(nativeHeight, this.effectiveMinHeight);
|
|
161
|
+
const finiteWidth = widthMode !== Utils.layout.UNSPECIFIED;
|
|
162
|
+
const finiteHeight = heightMode !== Utils.layout.UNSPECIFIED;
|
|
163
|
+
this._imageSourceAffectsLayout = widthMode !== Utils.layout.EXACTLY || heightMode !== Utils.layout.EXACTLY;
|
|
164
|
+
if (nativeWidth !== 0 && nativeHeight !== 0 && (finiteWidth || finiteHeight)) {
|
|
165
|
+
const scale = LottieView.computeScaleFactor(width, height, finiteWidth, finiteHeight, nativeWidth, nativeHeight, this.stretch);
|
|
166
|
+
const resultW = Math.round(nativeWidth * scale.width);
|
|
167
|
+
const resultH = Math.round(nativeHeight * scale.height);
|
|
168
|
+
measureWidth = finiteWidth ? Math.min(resultW, width) : resultW;
|
|
169
|
+
measureHeight = finiteHeight ? Math.min(resultH, height) : resultH;
|
|
170
|
+
}
|
|
171
|
+
const widthAndState = View.resolveSizeAndState(measureWidth, width, widthMode, 0);
|
|
172
|
+
const heightAndState = View.resolveSizeAndState(measureHeight, height, heightMode, 0);
|
|
173
|
+
this.setMeasuredDimension(widthAndState, heightAndState);
|
|
174
|
+
}
|
|
175
|
+
static computeScaleFactor(measureWidth, measureHeight, widthIsFinite, heightIsFinite, nativeWidth, nativeHeight, imageStretch) {
|
|
176
|
+
let scaleW = 1;
|
|
177
|
+
let scaleH = 1;
|
|
178
|
+
if ((imageStretch === "aspectFill" || imageStretch === "aspectFit" || imageStretch === "fill") && (widthIsFinite || heightIsFinite)) {
|
|
179
|
+
scaleW = nativeWidth > 0 ? measureWidth / nativeWidth : 0;
|
|
180
|
+
scaleH = nativeHeight > 0 ? measureHeight / nativeHeight : 0;
|
|
181
|
+
if (!widthIsFinite) scaleW = scaleH;
|
|
182
|
+
else if (!heightIsFinite) scaleH = scaleW;
|
|
183
|
+
else switch (imageStretch) {
|
|
184
|
+
case "aspectFit":
|
|
185
|
+
scaleH = scaleW < scaleH ? scaleW : scaleH;
|
|
186
|
+
scaleW = scaleH;
|
|
187
|
+
break;
|
|
188
|
+
case "aspectFill":
|
|
189
|
+
scaleH = scaleW > scaleH ? scaleW : scaleH;
|
|
190
|
+
scaleW = scaleH;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return {
|
|
194
|
+
width: scaleW,
|
|
195
|
+
height: scaleH
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
[stretchProperty.setNative](value) {
|
|
199
|
+
switch (value) {
|
|
200
|
+
case "aspectFit":
|
|
201
|
+
this.nativeViewProtected.contentMode = UIViewContentMode.ScaleAspectFit;
|
|
202
|
+
break;
|
|
203
|
+
case "aspectFill":
|
|
204
|
+
this.nativeViewProtected.contentMode = UIViewContentMode.ScaleAspectFill;
|
|
205
|
+
break;
|
|
206
|
+
case "fill":
|
|
207
|
+
this.nativeViewProtected.contentMode = UIViewContentMode.ScaleToFill;
|
|
208
|
+
break;
|
|
209
|
+
default: this.nativeViewProtected.contentMode = UIViewContentMode.TopLeft;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
//#endregion
|
|
214
|
+
export { LottieView };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Property, View, booleanConverter } from "@nativescript/core";
|
|
2
|
+
//#region src/vendor/ui-lottie/src/lottie/index.common.ts
|
|
3
|
+
/**********************************************************************************
|
|
4
|
+
* (c) 2017, Nathan Walker.
|
|
5
|
+
* Licensed under the MIT license.
|
|
6
|
+
*
|
|
7
|
+
* Version 1.0.0 walkerrunpdx@gmail.com
|
|
8
|
+
**********************************************************************************/
|
|
9
|
+
var LottieViewBase = class extends View {
|
|
10
|
+
static {
|
|
11
|
+
this.compositionLoadedEvent = "compositionLoaded";
|
|
12
|
+
}
|
|
13
|
+
static {
|
|
14
|
+
this.loadFailedEvent = "loadFailed";
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var srcProperty = new Property({ name: "src" });
|
|
18
|
+
srcProperty.register(LottieViewBase);
|
|
19
|
+
var asyncProperty = new Property({
|
|
20
|
+
name: "async",
|
|
21
|
+
defaultValue: false,
|
|
22
|
+
valueConverter: booleanConverter
|
|
23
|
+
});
|
|
24
|
+
asyncProperty.register(LottieViewBase);
|
|
25
|
+
var loopProperty = new Property({
|
|
26
|
+
name: "loop",
|
|
27
|
+
defaultValue: false,
|
|
28
|
+
valueConverter: booleanConverter
|
|
29
|
+
});
|
|
30
|
+
loopProperty.register(LottieViewBase);
|
|
31
|
+
var autoPlayProperty = new Property({
|
|
32
|
+
name: "autoPlay",
|
|
33
|
+
defaultValue: false,
|
|
34
|
+
valueConverter: booleanConverter
|
|
35
|
+
});
|
|
36
|
+
autoPlayProperty.register(LottieViewBase);
|
|
37
|
+
var renderModeProperty = new Property({ name: "renderMode" });
|
|
38
|
+
renderModeProperty.register(LottieViewBase);
|
|
39
|
+
var progressProperty = new Property({ name: "progress" });
|
|
40
|
+
progressProperty.register(LottieViewBase);
|
|
41
|
+
var stretchProperty = new Property({
|
|
42
|
+
name: "stretch",
|
|
43
|
+
defaultValue: "aspectFit",
|
|
44
|
+
affectsLayout: global.isIOS
|
|
45
|
+
});
|
|
46
|
+
stretchProperty.register(LottieViewBase);
|
|
47
|
+
var keyPathColorsProperty = new Property({ name: "keyPathColors" });
|
|
48
|
+
keyPathColorsProperty.register(LottieViewBase);
|
|
49
|
+
//#endregion
|
|
50
|
+
export { LottieViewBase, asyncProperty, autoPlayProperty, keyPathColorsProperty, loopProperty, progressProperty, renderModeProperty, srcProperty, stretchProperty };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/escape-props.web.ts
|
|
2
|
+
/** Apply DOM escape props after the primitive's own props. Dash-named keys
|
|
3
|
+
* are attributes; other keys use the DOM property where available. */
|
|
4
|
+
function applyEscapeProps(element, props) {
|
|
5
|
+
if (!element || !props.web) return;
|
|
6
|
+
for (const [key, value] of Object.entries(props.web)) if (key.includes("-")) {
|
|
7
|
+
if (value == null || value === false) element.removeAttribute(key);
|
|
8
|
+
else element.setAttribute(key, value === true ? "" : String(value));
|
|
9
|
+
} else if (key in element) try {
|
|
10
|
+
element[key] = value;
|
|
11
|
+
} catch {
|
|
12
|
+
element.setAttribute(key, String(value));
|
|
13
|
+
}
|
|
14
|
+
else if (value != null) element.setAttribute(key, String(value));
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { applyEscapeProps };
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import { applyEscapeProps } from "./escape-props.web.js";
|
|
2
|
+
import { layoutChildProps } from "./layout-child.web.js";
|
|
3
|
+
import { __s, bagOf, clone, hookSlots, snapshotSpread, template, useEffect, useImperativeHandle, useRef, useState } from "octane";
|
|
4
|
+
import { bindSignalChild, bindSignalHostPropSources, compilerMemoRegion, enableSignalBindings, hookMemoCreate, hookMemoPublishInvariant } from "octane/internal/client";
|
|
5
|
+
import lottie from "lottie-web";
|
|
6
|
+
//#region src/Lottie.web.tsrx
|
|
7
|
+
enableSignalBindings(1, true);
|
|
8
|
+
var _t$0 = /* @__PURE__ */ template("<div></div>");
|
|
9
|
+
var _hs$ = /* @__PURE__ */ hookSlots(10);
|
|
10
|
+
var _rm$1 = [
|
|
11
|
+
"s",
|
|
12
|
+
"o",
|
|
13
|
+
"n"
|
|
14
|
+
];
|
|
15
|
+
var PRESERVE = {
|
|
16
|
+
contain: "xMidYMid meet",
|
|
17
|
+
cover: "xMidYMid slice",
|
|
18
|
+
fill: "none"
|
|
19
|
+
};
|
|
20
|
+
var clamp01 = (n) => Math.min(1, Math.max(0, n));
|
|
21
|
+
var Lottie = /* @__PURE__ */ __s(function Lottie(props, __s, __extra) {
|
|
22
|
+
const __memoRegion = compilerMemoRegion(__s, _hs$ + 0);
|
|
23
|
+
let __hk = __memoRegion.hooks;
|
|
24
|
+
if (__hk === void 0) __memoRegion.hooks = __hk = hookMemoCreate(2);
|
|
25
|
+
const [animation, setAnimation] = useState(null, _hs$ + 0);
|
|
26
|
+
const el = useRef(null, _hs$ + 1);
|
|
27
|
+
const anim = useRef(null, _hs$ + 2);
|
|
28
|
+
const ready = useRef(false, _hs$ + 3);
|
|
29
|
+
const wantPlay = () => props.playing ?? props.autoPlay ?? true;
|
|
30
|
+
const build = (host) => {
|
|
31
|
+
anim.current?.destroy();
|
|
32
|
+
anim.current = null;
|
|
33
|
+
setAnimation(null);
|
|
34
|
+
ready.current = false;
|
|
35
|
+
let animationData;
|
|
36
|
+
try {
|
|
37
|
+
animationData = props.data ?? (props.src?.startsWith("{") ? JSON.parse(props.src) : void 0);
|
|
38
|
+
} catch (error) {
|
|
39
|
+
props.onError?.({ message: error instanceof Error ? error.message : String(error) });
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const path = animationData ? void 0 : props.src;
|
|
43
|
+
if (!animationData && !path) return;
|
|
44
|
+
let a;
|
|
45
|
+
try {
|
|
46
|
+
a = lottie.loadAnimation({
|
|
47
|
+
container: host,
|
|
48
|
+
renderer: "svg",
|
|
49
|
+
loop: props.loop ?? false,
|
|
50
|
+
autoplay: false,
|
|
51
|
+
animationData,
|
|
52
|
+
path,
|
|
53
|
+
rendererSettings: { preserveAspectRatio: PRESERVE[props.fit ?? "contain"] }
|
|
54
|
+
});
|
|
55
|
+
} catch (error) {
|
|
56
|
+
props.onError?.({ message: error instanceof Error ? error.message : String(error) });
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
anim.current = a;
|
|
60
|
+
setAnimation(a);
|
|
61
|
+
a.addEventListener("DOMLoaded", () => {
|
|
62
|
+
ready.current = true;
|
|
63
|
+
if (props.speed !== void 0) a.setSpeed(props.speed);
|
|
64
|
+
if (props.progress !== void 0) seekTo(props.progress);
|
|
65
|
+
props.onLoaded?.({ duration: a.getDuration() * 1e3 });
|
|
66
|
+
if (wantPlay()) a.play();
|
|
67
|
+
});
|
|
68
|
+
a.addEventListener("complete", () => props.onEnded?.());
|
|
69
|
+
a.addEventListener("data_failed", () => props.onError?.({ message: "animation data failed to load" }));
|
|
70
|
+
a.addEventListener("error", () => props.onError?.({ message: "animation failed" }));
|
|
71
|
+
};
|
|
72
|
+
const seekTo = __hk[0] ?? hookMemoPublishInvariant(__hk, 0, (p) => {
|
|
73
|
+
const a = anim.current;
|
|
74
|
+
if (!a) return;
|
|
75
|
+
const frame = clamp01(p) * a.totalFrames;
|
|
76
|
+
if (a.isPaused) a.goToAndStop(frame, true);
|
|
77
|
+
else a.goToAndPlay(frame, true);
|
|
78
|
+
});
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
const host = el.current;
|
|
81
|
+
if (!host) return;
|
|
82
|
+
build(host);
|
|
83
|
+
return () => {
|
|
84
|
+
anim.current?.destroy();
|
|
85
|
+
anim.current = null;
|
|
86
|
+
ready.current = false;
|
|
87
|
+
};
|
|
88
|
+
}, [
|
|
89
|
+
props.src,
|
|
90
|
+
props.data,
|
|
91
|
+
props.fit
|
|
92
|
+
], _hs$ + 4);
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
if (props.loop !== void 0 && anim.current) anim.current.loop = props.loop;
|
|
95
|
+
}, [props.loop], _hs$ + 5);
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
if (props.playing === void 0 || !anim.current || !ready.current) return;
|
|
98
|
+
if (props.playing) anim.current.play();
|
|
99
|
+
else anim.current.pause();
|
|
100
|
+
}, [props.playing], _hs$ + 6);
|
|
101
|
+
useEffect(() => {
|
|
102
|
+
if (props.progress === void 0) return;
|
|
103
|
+
seekTo(props.progress);
|
|
104
|
+
}, [props.progress], _hs$ + 7);
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
if (props.speed !== void 0) anim.current?.setSpeed(props.speed);
|
|
107
|
+
}, [props.speed], _hs$ + 8);
|
|
108
|
+
const handle = __hk[1] ?? hookMemoPublishInvariant(__hk, 1, (a) => ({
|
|
109
|
+
play: () => a.play(),
|
|
110
|
+
pause: () => a.pause(),
|
|
111
|
+
stop: () => a.stop(),
|
|
112
|
+
seekTo,
|
|
113
|
+
setSpeed: (n) => a.setSpeed(n),
|
|
114
|
+
progress: () => a.totalFrames ? a.currentRawFrame / a.totalFrames : 0,
|
|
115
|
+
duration: () => a.getDuration() * 1e3,
|
|
116
|
+
isPlaying: () => !a.isPaused,
|
|
117
|
+
native: a
|
|
118
|
+
}));
|
|
119
|
+
useImperativeHandle(props.ref, () => animation ? handle(animation) : null, [animation], _hs$ + 9);
|
|
120
|
+
let _b = __s.slots[0];
|
|
121
|
+
if (_b === void 0) {
|
|
122
|
+
let _m0, _m1, _m2, _m3, _m4, _m5, _m6, _m7, _m8, _m9, _m10, _m11, _m12, _m13, _m14;
|
|
123
|
+
const _root = clone(_t$0);
|
|
124
|
+
_m0 = (v) => {
|
|
125
|
+
el.current = v;
|
|
126
|
+
if (!v) return;
|
|
127
|
+
applyEscapeProps(v, props);
|
|
128
|
+
};
|
|
129
|
+
_m1 = props.id;
|
|
130
|
+
_m2 = props.className;
|
|
131
|
+
_m3 = snapshotSpread(layoutChildProps(props, props.style));
|
|
132
|
+
_m4 = props.accessibilityRole ?? "img";
|
|
133
|
+
_m5 = props.accessibilityLabel;
|
|
134
|
+
_m6 = props.accessible === false ? true : void 0;
|
|
135
|
+
_m7 = props.accessibilityHint;
|
|
136
|
+
_m8 = props.accessibilityValue;
|
|
137
|
+
_m9 = props.accessibilityState?.disabled;
|
|
138
|
+
_m10 = props.accessibilityState?.selected;
|
|
139
|
+
_m11 = props.accessibilityState?.checked;
|
|
140
|
+
_m12 = props.accessibilityLiveRegion === "none" ? "off" : props.accessibilityLiveRegion;
|
|
141
|
+
_m13 = _root;
|
|
142
|
+
_m14 = bindSignalHostPropSources(__s, void 0, _root, [
|
|
143
|
+
[
|
|
144
|
+
false,
|
|
145
|
+
"ref",
|
|
146
|
+
_m0
|
|
147
|
+
],
|
|
148
|
+
[
|
|
149
|
+
false,
|
|
150
|
+
"id",
|
|
151
|
+
_m1
|
|
152
|
+
],
|
|
153
|
+
[
|
|
154
|
+
false,
|
|
155
|
+
"className",
|
|
156
|
+
_m2
|
|
157
|
+
],
|
|
158
|
+
[true, _m3],
|
|
159
|
+
[
|
|
160
|
+
false,
|
|
161
|
+
"role",
|
|
162
|
+
_m4
|
|
163
|
+
],
|
|
164
|
+
[
|
|
165
|
+
false,
|
|
166
|
+
"aria-label",
|
|
167
|
+
_m5
|
|
168
|
+
],
|
|
169
|
+
[
|
|
170
|
+
false,
|
|
171
|
+
"aria-hidden",
|
|
172
|
+
_m6
|
|
173
|
+
],
|
|
174
|
+
[
|
|
175
|
+
false,
|
|
176
|
+
"aria-description",
|
|
177
|
+
_m7
|
|
178
|
+
],
|
|
179
|
+
[
|
|
180
|
+
false,
|
|
181
|
+
"aria-valuetext",
|
|
182
|
+
_m8
|
|
183
|
+
],
|
|
184
|
+
[
|
|
185
|
+
false,
|
|
186
|
+
"aria-disabled",
|
|
187
|
+
_m9
|
|
188
|
+
],
|
|
189
|
+
[
|
|
190
|
+
false,
|
|
191
|
+
"aria-selected",
|
|
192
|
+
_m10
|
|
193
|
+
],
|
|
194
|
+
[
|
|
195
|
+
false,
|
|
196
|
+
"aria-checked",
|
|
197
|
+
_m11
|
|
198
|
+
],
|
|
199
|
+
[
|
|
200
|
+
false,
|
|
201
|
+
"aria-live",
|
|
202
|
+
_m12
|
|
203
|
+
]
|
|
204
|
+
], "b:9888aaf9", false);
|
|
205
|
+
_b = bagOf(__s, _root, {
|
|
206
|
+
a: _m0,
|
|
207
|
+
b: _m1,
|
|
208
|
+
c: _m2,
|
|
209
|
+
d: _m3,
|
|
210
|
+
e: _m4,
|
|
211
|
+
f: _m5,
|
|
212
|
+
g: _m6,
|
|
213
|
+
h: _m7,
|
|
214
|
+
i: _m8,
|
|
215
|
+
j: _m9,
|
|
216
|
+
k: _m10,
|
|
217
|
+
l: _m11,
|
|
218
|
+
m: _m12,
|
|
219
|
+
n: _m13,
|
|
220
|
+
o: _m14,
|
|
221
|
+
p: null,
|
|
222
|
+
q: void 0
|
|
223
|
+
});
|
|
224
|
+
__s.refFields = _rm$1;
|
|
225
|
+
} else {
|
|
226
|
+
{
|
|
227
|
+
const _v = (v) => {
|
|
228
|
+
el.current = v;
|
|
229
|
+
if (!v) return;
|
|
230
|
+
applyEscapeProps(v, props);
|
|
231
|
+
};
|
|
232
|
+
if (_b.a !== _v) _b.a = _v;
|
|
233
|
+
}
|
|
234
|
+
{
|
|
235
|
+
const _v = props.id;
|
|
236
|
+
if (_b.b !== _v) _b.b = _v;
|
|
237
|
+
}
|
|
238
|
+
{
|
|
239
|
+
const _v = props.className;
|
|
240
|
+
if (_b.c !== _v) _b.c = _v;
|
|
241
|
+
}
|
|
242
|
+
_b.d = snapshotSpread(layoutChildProps(props, props.style));
|
|
243
|
+
{
|
|
244
|
+
const _v = props.accessibilityRole ?? "img";
|
|
245
|
+
if (_b.e !== _v) _b.e = _v;
|
|
246
|
+
}
|
|
247
|
+
{
|
|
248
|
+
const _v = props.accessibilityLabel;
|
|
249
|
+
if (_b.f !== _v) _b.f = _v;
|
|
250
|
+
}
|
|
251
|
+
{
|
|
252
|
+
const _v = props.accessible === false ? true : void 0;
|
|
253
|
+
if (_b.g !== _v) _b.g = _v;
|
|
254
|
+
}
|
|
255
|
+
{
|
|
256
|
+
const _v = props.accessibilityHint;
|
|
257
|
+
if (_b.h !== _v) _b.h = _v;
|
|
258
|
+
}
|
|
259
|
+
{
|
|
260
|
+
const _v = props.accessibilityValue;
|
|
261
|
+
if (_b.i !== _v) _b.i = _v;
|
|
262
|
+
}
|
|
263
|
+
{
|
|
264
|
+
const _v = props.accessibilityState?.disabled;
|
|
265
|
+
if (_b.j !== _v) _b.j = _v;
|
|
266
|
+
}
|
|
267
|
+
{
|
|
268
|
+
const _v = props.accessibilityState?.selected;
|
|
269
|
+
if (_b.k !== _v) _b.k = _v;
|
|
270
|
+
}
|
|
271
|
+
{
|
|
272
|
+
const _v = props.accessibilityState?.checked;
|
|
273
|
+
if (_b.l !== _v) _b.l = _v;
|
|
274
|
+
}
|
|
275
|
+
{
|
|
276
|
+
const _v = props.accessibilityLiveRegion === "none" ? "off" : props.accessibilityLiveRegion;
|
|
277
|
+
if (_b.m !== _v) _b.m = _v;
|
|
278
|
+
}
|
|
279
|
+
_b.o = bindSignalHostPropSources(__s, _b.o, _b.n, [
|
|
280
|
+
[
|
|
281
|
+
false,
|
|
282
|
+
"ref",
|
|
283
|
+
_b.a
|
|
284
|
+
],
|
|
285
|
+
[
|
|
286
|
+
false,
|
|
287
|
+
"id",
|
|
288
|
+
_b.b
|
|
289
|
+
],
|
|
290
|
+
[
|
|
291
|
+
false,
|
|
292
|
+
"className",
|
|
293
|
+
_b.c
|
|
294
|
+
],
|
|
295
|
+
[true, _b.d],
|
|
296
|
+
[
|
|
297
|
+
false,
|
|
298
|
+
"role",
|
|
299
|
+
_b.e
|
|
300
|
+
],
|
|
301
|
+
[
|
|
302
|
+
false,
|
|
303
|
+
"aria-label",
|
|
304
|
+
_b.f
|
|
305
|
+
],
|
|
306
|
+
[
|
|
307
|
+
false,
|
|
308
|
+
"aria-hidden",
|
|
309
|
+
_b.g
|
|
310
|
+
],
|
|
311
|
+
[
|
|
312
|
+
false,
|
|
313
|
+
"aria-description",
|
|
314
|
+
_b.h
|
|
315
|
+
],
|
|
316
|
+
[
|
|
317
|
+
false,
|
|
318
|
+
"aria-valuetext",
|
|
319
|
+
_b.i
|
|
320
|
+
],
|
|
321
|
+
[
|
|
322
|
+
false,
|
|
323
|
+
"aria-disabled",
|
|
324
|
+
_b.j
|
|
325
|
+
],
|
|
326
|
+
[
|
|
327
|
+
false,
|
|
328
|
+
"aria-selected",
|
|
329
|
+
_b.k
|
|
330
|
+
],
|
|
331
|
+
[
|
|
332
|
+
false,
|
|
333
|
+
"aria-checked",
|
|
334
|
+
_b.l
|
|
335
|
+
],
|
|
336
|
+
[
|
|
337
|
+
false,
|
|
338
|
+
"aria-live",
|
|
339
|
+
_b.m
|
|
340
|
+
]
|
|
341
|
+
], "b:9888aaf9", false);
|
|
342
|
+
}
|
|
343
|
+
_b.r = bindSignalChild(__s, _b.r, 1, _b.n, Object.prototype.propertyIsEnumerable.call(_b.o.resolved, "children") ? _b.o.resolved.children : void 0, "b:9888aaf9", null, void 0, void 0, void 0, true);
|
|
344
|
+
});
|
|
345
|
+
//#endregion
|
|
346
|
+
export { Lottie };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region src/layout-child.web.ts
|
|
2
|
+
/** The shared contract is "numbers are dips" (RN semantics), but octane's DOM
|
|
3
|
+
* renderer keeps React's unitless list — lineHeight is unitless there, so
|
|
4
|
+
* `style={{lineHeight: 40}}` would render a 40× multiplier instead of 40px.
|
|
5
|
+
* lineHeight is the one unitless-in-React prop that is a length in the
|
|
6
|
+
* shared vocabulary; force the px suffix. */
|
|
7
|
+
function normStyle(style) {
|
|
8
|
+
if (style && typeof style.lineHeight === "number") return {
|
|
9
|
+
...style,
|
|
10
|
+
lineHeight: style.lineHeight + "px"
|
|
11
|
+
};
|
|
12
|
+
return style;
|
|
13
|
+
}
|
|
14
|
+
var FLEX_JUSTIFY = {
|
|
15
|
+
start: "flex-start",
|
|
16
|
+
end: "flex-end"
|
|
17
|
+
};
|
|
18
|
+
var FLEX_ALIGN = {
|
|
19
|
+
start: "flex-start",
|
|
20
|
+
end: "flex-end"
|
|
21
|
+
};
|
|
22
|
+
/** Convert parent-layout metadata to CSS on the web leaf. Native's `dock`
|
|
23
|
+
* attribute has no CSS equivalent and is ignored on web. Grid indices are
|
|
24
|
+
* zero-based in the shared API, matching NativeScript. */
|
|
25
|
+
function layoutChildProps(props, baseStyle = props.style) {
|
|
26
|
+
const style = { ...normStyle(baseStyle) };
|
|
27
|
+
if (props.row !== void 0) style.gridRow = `${props.row + 1} / span ${props.rowSpan ?? 1}`;
|
|
28
|
+
else if (props.rowSpan !== void 0) style.gridRow = `span ${props.rowSpan}`;
|
|
29
|
+
if (props.col !== void 0) style.gridColumn = `${props.col + 1} / span ${props.colSpan ?? 1}`;
|
|
30
|
+
else if (props.colSpan !== void 0) style.gridColumn = `span ${props.colSpan}`;
|
|
31
|
+
if (props.left !== void 0) style.left = props.left;
|
|
32
|
+
if (props.top !== void 0) style.top = props.top;
|
|
33
|
+
if (props.flexGrow !== void 0) style.flexGrow = props.flexGrow;
|
|
34
|
+
if (props.flexShrink !== void 0) style.flexShrink = props.flexShrink;
|
|
35
|
+
if (props.alignSelf !== void 0) style.alignSelf = props.alignSelf;
|
|
36
|
+
if (props.order !== void 0) style.order = props.order;
|
|
37
|
+
if (props.justifyContent !== void 0) style.justifyContent = FLEX_JUSTIFY[props.justifyContent] ?? props.justifyContent;
|
|
38
|
+
if (props.alignItems !== void 0) style.alignItems = FLEX_ALIGN[props.alignItems] ?? props.alignItems;
|
|
39
|
+
if (props.flexWrap !== void 0) style.flexWrap = props.flexWrap === true ? "wrap" : props.flexWrap === false ? "nowrap" : props.flexWrap;
|
|
40
|
+
if (props.gap !== void 0) style.gap = props.gap;
|
|
41
|
+
if (props.rowGap !== void 0) style.rowGap = props.rowGap;
|
|
42
|
+
if (props.columnGap !== void 0) style.columnGap = props.columnGap;
|
|
43
|
+
if (typeof style.lineHeight === "number") style.lineHeight = style.lineHeight + "px";
|
|
44
|
+
return { style };
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { layoutChildProps, normStyle };
|