@react-native-ohos/react-native-clippathview 1.2.0 → 1.2.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,9 +4,9 @@ This project is based on [react-native-clippathview v1.1.8](https://github.com/O
4
4
 
5
5
  ## Documentation
6
6
 
7
- [中文](https://gitcode.com/OpenHarmony-RN/usage-docs/blob/master/zh-cn/react-native-clippath-capi.md)
7
+ [中文](https://gitcode.com/CPF-RN/usage-docs/blob/master/zh-cn/react-native-clippath-capi.md)
8
8
 
9
- [English](https://gitcode.com/OpenHarmony-RN/usage-docs/blob/master/en/react-native-clippath-capi.md)
9
+ [English](https://gitcode.com/CPF-RN/usage-docs/blob/master/en/react-native-clippath-capi.md)
10
10
 
11
11
 
12
12
  ## License
@@ -1,6 +1,17 @@
1
- export default class BuildProfile {
2
- static readonly HAR_VERSION = '1.1.8';
3
- static readonly BUILD_MODE_NAME = 'debug';
4
- static readonly DEBUG = true;
5
- static readonly TARGET_NAME = 'default';
1
+ /**
2
+ * Use these variables when you tailor your ArkTS code. They must be of the const type.
3
+ */
4
+ export const HAR_VERSION = '1.2.1-beta.1';
5
+ export const BUILD_MODE_NAME = 'debug';
6
+ export const DEBUG = true;
7
+ export const TARGET_NAME = 'default';
8
+
9
+ /**
10
+ * BuildProfile Class is used only for compatibility purposes.
11
+ */
12
+ export default class BuildProfile {
13
+ static readonly HAR_VERSION = HAR_VERSION;
14
+ static readonly BUILD_MODE_NAME = BUILD_MODE_NAME;
15
+ static readonly DEBUG = DEBUG;
16
+ static readonly TARGET_NAME = TARGET_NAME;
6
17
  }
@@ -6,7 +6,7 @@
6
6
  "name": "@react-native-ohos/react-native-clippathview",
7
7
  "description": "Please describe the basic information.",
8
8
  "main": "index.ets",
9
- "version": "1.2.0",
9
+ "version": "1.2.1-beta.1",
10
10
  "dependencies": {
11
11
  "@rnoh/react-native-openharmony": "file:../react_native_openharmony"
12
12
  },
@@ -106,6 +106,9 @@ void ClipPathViewNoneNode::setPanStyleMode(OH_Drawing_Canvas *canvas, int type)
106
106
  }
107
107
 
108
108
  void ClipPathViewNoneNode::OnDraw(ArkUI_NodeCustomEvent *event) {
109
+ if (mD.empty()) {
110
+ return;
111
+ }
109
112
  auto *drawContext = OH_ArkUI_NodeCustomEvent_GetDrawContextInDraw(event);
110
113
  canvas = reinterpret_cast<OH_Drawing_Canvas *>(OH_ArkUI_DrawContext_GetCanvas(drawContext));
111
114
  auto width_ = OH_Drawing_CanvasGetWidth(canvas);
@@ -60,8 +60,10 @@ namespace rnoh {
60
60
  }
61
61
 
62
62
  std::vector<facebook::react::ComponentDescriptorProvider> createComponentDescriptorProviders() override {
63
- return {facebook::react::concreteComponentDescriptorProvider<
64
- facebook::react::RNCClipPathViewNoneComponentDescriptor>()};
63
+ return {
64
+ facebook::react::concreteComponentDescriptorProvider<facebook::react::RNCClipPathViewNoneComponentDescriptor>(),
65
+ facebook::react::concreteComponentDescriptorProvider<facebook::react::RNCClipPathViewComponentDescriptor>()
66
+ };
65
67
  }
66
68
 
67
69
  std::unique_ptr<TurboModuleFactoryDelegate> createTurboModuleFactoryDelegate() override {
Binary file
package/index.js CHANGED
@@ -1,5 +1,4 @@
1
- import {Platfotm} from 'react-native'
2
- import ClipPathViewNoneAndroid from './src/ClipPathH.android.js'
3
- import ClipPathViewAndroid from './src/ClipPath.android.js'
4
- export const ClipPathView = ClipPathViewAndroid;
5
- export const ClipPathViewH = ClipPathViewNoneAndroid;
1
+ import ClipPathViewNoneHarmony from './src/ClipPathH.harmony.js'
2
+ import ClipPathViewHarmony from './src/ClipPath.harmony.js'
3
+ export const ClipPathView = ClipPathViewHarmony;
4
+ export const ClipPathViewH = ClipPathViewNoneHarmony;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@react-native-ohos/react-native-clippathview",
3
3
  "title": "React Native ClipPath",
4
- "version": "1.2.0",
4
+ "version": "1.2.1-beta.1",
5
5
  "description": "ClipPath Android Web IOS Harmony",
6
6
  "main": "index.js",
7
7
  "types": "index.d.ts",
@@ -0,0 +1,29 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2026 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+
25
+ import ClipPathMobileN from './ClipPathMobileN'
26
+
27
+ const ClipPath = ClipPathMobileN
28
+
29
+ export default ClipPath
@@ -0,0 +1,29 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2026 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+
25
+ import ClipPathMobile from './ClipPathMobile'
26
+
27
+ const ClipPathH = ClipPathMobile
28
+
29
+ export default ClipPathH