@react-native-ohos/lottie-react-native 7.2.3-rc.1 → 7.2.3-rc.2
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/LICENSE +200 -200
- package/README.OpenSource +10 -10
- package/README.md +12 -12
- package/harmony/lottie/BuildProfile.ets +20 -20
- package/harmony/lottie/build-profile.json5 +8 -8
- package/harmony/lottie/hvigorfile.ts +5 -5
- package/harmony/lottie/index.ets +5 -5
- package/harmony/lottie/oh-package.json5 +14 -14
- package/harmony/lottie/src/main/cpp/CMakeLists.txt +9 -9
- package/harmony/lottie/src/main/cpp/LottieAnimationViewPackage.h +12 -12
- package/harmony/lottie/src/main/cpp/generated/RNOH/generated/BaseLottieReactNativePackage.h +68 -68
- package/harmony/lottie/src/main/cpp/generated/RNOH/generated/components/LottieAnimationViewJSIBinder.h +43 -43
- package/harmony/lottie/src/main/cpp/generated/react/renderer/components/lottie_react_native/ComponentDescriptors.h +22 -22
- package/harmony/lottie/src/main/cpp/generated/react/renderer/components/lottie_react_native/EventEmitters.cpp +44 -44
- package/harmony/lottie/src/main/cpp/generated/react/renderer/components/lottie_react_native/EventEmitters.h +39 -39
- package/harmony/lottie/src/main/cpp/generated/react/renderer/components/lottie_react_native/Props.cpp +41 -41
- package/harmony/lottie/src/main/cpp/generated/react/renderer/components/lottie_react_native/Props.h +42 -42
- package/harmony/lottie/src/main/cpp/generated/react/renderer/components/lottie_react_native/ShadowNodes.cpp +19 -19
- package/harmony/lottie/src/main/cpp/generated/react/renderer/components/lottie_react_native/ShadowNodes.h +34 -34
- package/harmony/lottie/src/main/cpp/generated/react/renderer/components/lottie_react_native/States.cpp +18 -18
- package/harmony/lottie/src/main/cpp/generated/react/renderer/components/lottie_react_native/States.h +35 -35
- package/harmony/lottie/src/main/ets/LottieAnimationTools.ets +20 -20
- package/harmony/lottie/src/main/ets/LottieAnimationView.ets +396 -393
- package/harmony/lottie/src/main/ets/LottieAnimationViewPackage.ts +16 -16
- package/harmony/lottie/src/main/ets/LottieCompositionCache.ets +29 -29
- package/harmony/lottie/src/main/ets/common/TextUtils.ets +17 -17
- package/harmony/lottie/src/main/ets/generated/components/LottieAnimationView.ts +181 -181
- package/harmony/lottie/src/main/ets/generated/components/ts.ts +5 -5
- package/harmony/lottie/src/main/ets/generated/index.ets +5 -5
- package/harmony/lottie/src/main/ets/generated/ts.ts +6 -6
- package/harmony/lottie/src/main/ets/generated/turboModules/ts.ts +5 -5
- package/harmony/lottie/src/main/module.json5 +9 -9
- package/harmony/lottie/src/main/resources/base/element/string.json +8 -8
- package/harmony/lottie/src/main/resources/en_US/element/string.json +8 -8
- package/harmony/lottie/src/main/resources/zh_CN/element/string.json +8 -8
- package/harmony/lottie/ts.ts +4 -4
- package/harmony/lottie.har +0 -0
- package/lib/commonjs/LottieAnimationViewNativeComponent.js.map +1 -1
- package/lib/commonjs/codegenUtils.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/LottieAnimationViewNativeComponent.js.map +1 -1
- package/lib/module/codegenUtils.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/package.json +131 -131
- package/src/LottieAnimationViewNativeComponent.ts +77 -77
- package/src/codegenUtils.ts +8 -8
- package/src/index.tsx +7 -7
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateShadowNodeH.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#pragma once
|
|
12
|
-
|
|
13
|
-
#include <react/renderer/components/lottie_react_native/EventEmitters.h>
|
|
14
|
-
#include <react/renderer/components/lottie_react_native/Props.h>
|
|
15
|
-
#include <react/renderer/components/lottie_react_native/States.h>
|
|
16
|
-
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
|
17
|
-
#include <jsi/jsi.h>
|
|
18
|
-
|
|
19
|
-
namespace facebook {
|
|
20
|
-
namespace react {
|
|
21
|
-
|
|
22
|
-
JSI_EXPORT extern const char LottieAnimationViewComponentName[];
|
|
23
|
-
|
|
24
|
-
/*
|
|
25
|
-
* `ShadowNode` for <LottieAnimationView> component.
|
|
26
|
-
*/
|
|
27
|
-
using LottieAnimationViewShadowNode = ConcreteViewShadowNode<
|
|
28
|
-
LottieAnimationViewComponentName,
|
|
29
|
-
LottieAnimationViewProps,
|
|
30
|
-
LottieAnimationViewEventEmitter,
|
|
31
|
-
LottieAnimationViewState>;
|
|
32
|
-
|
|
33
|
-
} // namespace react
|
|
34
|
-
} // namespace facebook
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateShadowNodeH.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#pragma once
|
|
12
|
+
|
|
13
|
+
#include <react/renderer/components/lottie_react_native/EventEmitters.h>
|
|
14
|
+
#include <react/renderer/components/lottie_react_native/Props.h>
|
|
15
|
+
#include <react/renderer/components/lottie_react_native/States.h>
|
|
16
|
+
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
|
17
|
+
#include <jsi/jsi.h>
|
|
18
|
+
|
|
19
|
+
namespace facebook {
|
|
20
|
+
namespace react {
|
|
21
|
+
|
|
22
|
+
JSI_EXPORT extern const char LottieAnimationViewComponentName[];
|
|
23
|
+
|
|
24
|
+
/*
|
|
25
|
+
* `ShadowNode` for <LottieAnimationView> component.
|
|
26
|
+
*/
|
|
27
|
+
using LottieAnimationViewShadowNode = ConcreteViewShadowNode<
|
|
28
|
+
LottieAnimationViewComponentName,
|
|
29
|
+
LottieAnimationViewProps,
|
|
30
|
+
LottieAnimationViewEventEmitter,
|
|
31
|
+
LottieAnimationViewState>;
|
|
32
|
+
|
|
33
|
+
} // namespace react
|
|
34
|
+
} // namespace facebook
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateStateCpp.js
|
|
9
|
-
*/
|
|
10
|
-
#include <react/renderer/components/lottie_react_native/States.h>
|
|
11
|
-
|
|
12
|
-
namespace facebook {
|
|
13
|
-
namespace react {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} // namespace react
|
|
18
|
-
} // namespace facebook
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateStateCpp.js
|
|
9
|
+
*/
|
|
10
|
+
#include <react/renderer/components/lottie_react_native/States.h>
|
|
11
|
+
|
|
12
|
+
namespace facebook {
|
|
13
|
+
namespace react {
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
} // namespace react
|
|
18
|
+
} // namespace facebook
|
package/harmony/lottie/src/main/cpp/generated/react/renderer/components/lottie_react_native/States.h
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateStateH.js
|
|
8
|
-
*/
|
|
9
|
-
#pragma once
|
|
10
|
-
|
|
11
|
-
#ifdef ANDROID
|
|
12
|
-
#include <folly/dynamic.h>
|
|
13
|
-
#include <react/renderer/mapbuffer/MapBuffer.h>
|
|
14
|
-
#include <react/renderer/mapbuffer/MapBufferBuilder.h>
|
|
15
|
-
#endif
|
|
16
|
-
|
|
17
|
-
namespace facebook {
|
|
18
|
-
namespace react {
|
|
19
|
-
|
|
20
|
-
class LottieAnimationViewState {
|
|
21
|
-
public:
|
|
22
|
-
LottieAnimationViewState() = default;
|
|
23
|
-
|
|
24
|
-
#ifdef ANDROID
|
|
25
|
-
LottieAnimationViewState(LottieAnimationViewState const &previousState, folly::dynamic data){};
|
|
26
|
-
folly::dynamic getDynamic() const {
|
|
27
|
-
return {};
|
|
28
|
-
};
|
|
29
|
-
MapBuffer getMapBuffer() const {
|
|
30
|
-
return MapBufferBuilder::EMPTY();
|
|
31
|
-
};
|
|
32
|
-
#endif
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
} // namespace react
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
+
* once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generated by codegen project: GenerateStateH.js
|
|
8
|
+
*/
|
|
9
|
+
#pragma once
|
|
10
|
+
|
|
11
|
+
#ifdef ANDROID
|
|
12
|
+
#include <folly/dynamic.h>
|
|
13
|
+
#include <react/renderer/mapbuffer/MapBuffer.h>
|
|
14
|
+
#include <react/renderer/mapbuffer/MapBufferBuilder.h>
|
|
15
|
+
#endif
|
|
16
|
+
|
|
17
|
+
namespace facebook {
|
|
18
|
+
namespace react {
|
|
19
|
+
|
|
20
|
+
class LottieAnimationViewState {
|
|
21
|
+
public:
|
|
22
|
+
LottieAnimationViewState() = default;
|
|
23
|
+
|
|
24
|
+
#ifdef ANDROID
|
|
25
|
+
LottieAnimationViewState(LottieAnimationViewState const &previousState, folly::dynamic data){};
|
|
26
|
+
folly::dynamic getDynamic() const {
|
|
27
|
+
return {};
|
|
28
|
+
};
|
|
29
|
+
MapBuffer getMapBuffer() const {
|
|
30
|
+
return MapBufferBuilder::EMPTY();
|
|
31
|
+
};
|
|
32
|
+
#endif
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
} // namespace react
|
|
36
36
|
} // namespace facebook
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
// Copyright (c) 2025 Huawei Device Co., Ltd. All rights reserved
|
|
2
|
-
// Use of this source code is governed by a Apache-2.0 license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
import { AnimationObject, AnimationAssets } from './common/Animation'
|
|
6
|
-
import { isEmpty } from './common/TextUtils'
|
|
7
|
-
|
|
8
|
-
export function convertImageFolder(jsonData: AnimationObject, imagesFolder: string): AnimationObject {
|
|
9
|
-
let assets: AnimationAssets[] = jsonData.assets
|
|
10
|
-
if (assets != undefined && assets.length > 0 && !isEmpty(imagesFolder)) {
|
|
11
|
-
if (imagesFolder.charAt(imagesFolder.length - 1) != '/') {
|
|
12
|
-
imagesFolder = imagesFolder + '/'
|
|
13
|
-
}
|
|
14
|
-
let assetsTemp: AnimationAssets[] = assets.map((obj: AnimationAssets) => {
|
|
15
|
-
obj.u = imagesFolder
|
|
16
|
-
return obj
|
|
17
|
-
})
|
|
18
|
-
jsonData.assets = assetsTemp
|
|
19
|
-
}
|
|
20
|
-
return jsonData
|
|
1
|
+
// Copyright (c) 2025 Huawei Device Co., Ltd. All rights reserved
|
|
2
|
+
// Use of this source code is governed by a Apache-2.0 license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import { AnimationObject, AnimationAssets } from './common/Animation'
|
|
6
|
+
import { isEmpty } from './common/TextUtils'
|
|
7
|
+
|
|
8
|
+
export function convertImageFolder(jsonData: AnimationObject, imagesFolder: string): AnimationObject {
|
|
9
|
+
let assets: AnimationAssets[] = jsonData.assets
|
|
10
|
+
if (assets != undefined && assets.length > 0 && !isEmpty(imagesFolder)) {
|
|
11
|
+
if (imagesFolder.charAt(imagesFolder.length - 1) != '/') {
|
|
12
|
+
imagesFolder = imagesFolder + '/'
|
|
13
|
+
}
|
|
14
|
+
let assetsTemp: AnimationAssets[] = assets.map((obj: AnimationAssets) => {
|
|
15
|
+
obj.u = imagesFolder
|
|
16
|
+
return obj
|
|
17
|
+
})
|
|
18
|
+
jsonData.assets = assetsTemp
|
|
19
|
+
}
|
|
20
|
+
return jsonData
|
|
21
21
|
}
|