@react-native-ohos/react-native-svg 15.12.1-rc.1 → 15.12.1-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.
Files changed (83) hide show
  1. package/LICENSE +21 -21
  2. package/README.OpenSource +10 -10
  3. package/README.md +13 -13
  4. package/css/package.json +5 -5
  5. package/harmony/svg/BuildProfile.ets +16 -16
  6. package/harmony/svg/build-profile.json5 +9 -9
  7. package/harmony/svg/hvigorfile.ts +1 -1
  8. package/harmony/svg/index.ets +6 -6
  9. package/harmony/svg/oh-package.json5 +13 -13
  10. package/harmony/svg/src/main/cpp/SvgFilter.cpp +505 -505
  11. package/harmony/svg/src/main/cpp/SvgFilter.h +112 -112
  12. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeBlendComponentInstance.cpp +40 -40
  13. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeBlendComponentInstance.h +48 -48
  14. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeColorMatrixComponentInstance.cpp +33 -33
  15. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeColorMatrixComponentInstance.h +48 -48
  16. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeCompositeComponentInstance.cpp +39 -39
  17. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeCompositeComponentInstance.h +55 -55
  18. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeFloodComponentInstance.cpp +33 -33
  19. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeFloodComponentInstance.h +49 -49
  20. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeGaussianBlurComponentInstance.cpp +34 -34
  21. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeGaussianBlurComponentInstance.h +48 -48
  22. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeOffsetComponentInstance.cpp +35 -35
  23. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeOffsetComponentInstance.h +45 -45
  24. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFilterComponentInstance.cpp +198 -198
  25. package/harmony/svg/src/main/cpp/componentInstances/RNSVGFilterComponentInstance.h +48 -48
  26. package/harmony/svg/src/main/cpp/componentInstances/RNSVGImageComponentInstance.cpp +4 -1
  27. package/harmony/svg/src/main/cpp/downloadUtils/ImageSourceResolver.cpp +36 -15
  28. package/harmony/svg/src/main/cpp/downloadUtils/ImageSourceResolver.h +6 -10
  29. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeBlendJSIBinder.h +26 -26
  30. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeColorMatrixJSIBinder.h +26 -26
  31. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeCompositeJSIBinder.h +30 -30
  32. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeFloodJSIBinder.h +26 -26
  33. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeGaussianBlurJSIBinder.h +26 -26
  34. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeOffsetJSIBinder.h +26 -26
  35. package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFilterJSIBinder.h +44 -44
  36. package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/Props.cpp +977 -977
  37. package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/Props.h +1280 -1280
  38. package/harmony/svg/src/main/cpp/utils/DynamicUtils.h +55 -55
  39. package/harmony/svg/src/main/cpp/utils/FilterManager.h +190 -190
  40. package/harmony/svg/src/main/ets/RNSVGImageModule.ts +21 -21
  41. package/harmony/svg/src/main/ets/RNSVGRenderableModule.ts +16 -16
  42. package/harmony/svg/src/main/ets/RNSVGSvgViewModule.ts +18 -18
  43. package/harmony/svg/src/main/ets/SvgPackage.ts +57 -57
  44. package/harmony/svg/src/main/module.json5 +7 -7
  45. package/harmony/svg/src/main/resources/base/element/string.json +8 -8
  46. package/harmony/svg/src/main/resources/en_US/element/string.json +8 -8
  47. package/harmony/svg/src/main/resources/zh_CN/element/string.json +8 -8
  48. package/harmony/svg/ts.ts +7 -7
  49. package/harmony/svg.har +0 -0
  50. package/lib/commonjs/css/index.js +54 -54
  51. package/lib/commonjs/index.js +25 -25
  52. package/lib/module/css/index.js +3 -3
  53. package/lib/module/index.js +2 -2
  54. package/package.json +52 -54
  55. package/src/css/index.tsx +19 -19
  56. package/src/index.tsx +2 -2
  57. package/tsconfig.json +11 -11
  58. package/lib/typescript/babel.config.d.ts +0 -8
  59. package/lib/typescript/babel.config.d.ts.map +0 -1
  60. package/lib/typescript/example/babel.config.d.ts +0 -3
  61. package/lib/typescript/example/babel.config.d.ts.map +0 -1
  62. package/lib/typescript/example/contexts.d.ts +0 -3
  63. package/lib/typescript/example/contexts.d.ts.map +0 -1
  64. package/lib/typescript/example/harmony/entry/hvigorfile.d.ts +0 -2
  65. package/lib/typescript/example/harmony/entry/hvigorfile.d.ts.map +0 -1
  66. package/lib/typescript/example/harmony/hvigorfile.d.ts +0 -2
  67. package/lib/typescript/example/harmony/hvigorfile.d.ts.map +0 -1
  68. package/lib/typescript/example/index.d.ts +0 -2
  69. package/lib/typescript/example/index.d.ts.map +0 -1
  70. package/lib/typescript/example/jest.config.d.ts +0 -3
  71. package/lib/typescript/example/jest.config.d.ts.map +0 -1
  72. package/lib/typescript/example/metro.config.d.ts +0 -3
  73. package/lib/typescript/example/metro.config.d.ts.map +0 -1
  74. package/lib/typescript/example/react-native.config.d.ts +0 -3
  75. package/lib/typescript/example/react-native.config.d.ts.map +0 -1
  76. package/lib/typescript/example/scripts/create-build-profile.d.ts +0 -2
  77. package/lib/typescript/example/scripts/create-build-profile.d.ts.map +0 -1
  78. package/lib/typescript/example/src/index.d.ts +0 -3
  79. package/lib/typescript/example/src/index.d.ts.map +0 -1
  80. package/lib/typescript/src/css/index.d.ts +0 -4
  81. package/lib/typescript/src/css/index.d.ts.map +0 -1
  82. package/lib/typescript/src/index.d.ts +0 -3
  83. package/lib/typescript/src/index.d.ts.map +0 -1
@@ -1,58 +1,58 @@
1
- /*
2
- * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
3
- * Use of this source code is governed by a MIT license that can be
4
- * found in the LICENSE file.
5
- */
6
-
7
- import { RNPackage, TurboModulesFactory } from '@rnoh/react-native-openharmony/ts';
8
- import type { TurboModule, TurboModuleContext } from '@rnoh/react-native-openharmony/ts';
9
- import { RNSVGSvgViewModule } from './RNSVGSvgViewModule';
10
- import { RNSVGRenderableModule } from './RNSVGRenderableModule';
11
- import { RNSVGImageModule } from './RNSVGImageModule';
12
- import { hilog } from '@kit.PerformanceAnalysisKit';
13
-
14
- class MyLog {
15
- static e(logTag: string, content: string) {
16
- const maxSize = 1024;
17
- if (content.length <= maxSize) {
18
- // 长度小于等于限制直接打印
19
- hilog.error(0xFF00, logTag, '%{public}s', content);
20
- } else {
21
- while (content.length > maxSize) {
22
- // 循环分段打印
23
- let logContent = content.substring(0, maxSize);
24
- content = content.replace(logContent, '');
25
- hilog.error(0xFF00, logTag, '%{public}s', logContent); // 打印剩余日志
26
- }
27
- }
28
- }
29
- }
30
-
31
- class SvgTurboModulesFactory extends TurboModulesFactory {
32
-
33
- createTurboModule(name: string): TurboModule | null {
34
- console.log('[kuang] SvgPackage createTurboModule = ', name)
35
-
36
- if (name === 'RNSVGSvgViewModule') {
37
- return new RNSVGSvgViewModule(this.ctx);
38
- }
39
- if (name === 'RNSVGRenderableModule') {
40
- return new RNSVGRenderableModule(this.ctx);
41
- }
42
- if (name === 'RNSVGImageModule') {
43
- return new RNSVGImageModule(this.ctx);
44
- }
45
- return null;
46
- }
47
-
48
- hasTurboModule(name: string): boolean {
49
- return name === 'RNSVGSvgViewModule' || name === 'RNSVGRenderableModule' || name === 'RNSVGImageModule';
50
- }
51
- }
52
-
53
- export class SvgPackage extends RNPackage {
54
- createTurboModulesFactory(ctx: TurboModuleContext): TurboModulesFactory {
55
- MyLog.e('[kuang] SvgPackage createTurboModulesFactory = ', JSON.stringify(ctx));
56
- return new SvgTurboModulesFactory(ctx);
57
- }
1
+ /*
2
+ * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
3
+ * Use of this source code is governed by a MIT license that can be
4
+ * found in the LICENSE file.
5
+ */
6
+
7
+ import { RNPackage, TurboModulesFactory } from '@rnoh/react-native-openharmony/ts';
8
+ import type { TurboModule, TurboModuleContext } from '@rnoh/react-native-openharmony/ts';
9
+ import { RNSVGSvgViewModule } from './RNSVGSvgViewModule';
10
+ import { RNSVGRenderableModule } from './RNSVGRenderableModule';
11
+ import { RNSVGImageModule } from './RNSVGImageModule';
12
+ import { hilog } from '@kit.PerformanceAnalysisKit';
13
+
14
+ class MyLog {
15
+ static e(logTag: string, content: string) {
16
+ const maxSize = 1024;
17
+ if (content.length <= maxSize) {
18
+ // 长度小于等于限制直接打印
19
+ hilog.error(0xFF00, logTag, '%{public}s', content);
20
+ } else {
21
+ while (content.length > maxSize) {
22
+ // 循环分段打印
23
+ let logContent = content.substring(0, maxSize);
24
+ content = content.replace(logContent, '');
25
+ hilog.error(0xFF00, logTag, '%{public}s', logContent); // 打印剩余日志
26
+ }
27
+ }
28
+ }
29
+ }
30
+
31
+ class SvgTurboModulesFactory extends TurboModulesFactory {
32
+
33
+ createTurboModule(name: string): TurboModule | null {
34
+ console.log('[kuang] SvgPackage createTurboModule = ', name)
35
+
36
+ if (name === 'RNSVGSvgViewModule') {
37
+ return new RNSVGSvgViewModule(this.ctx);
38
+ }
39
+ if (name === 'RNSVGRenderableModule') {
40
+ return new RNSVGRenderableModule(this.ctx);
41
+ }
42
+ if (name === 'RNSVGImageModule') {
43
+ return new RNSVGImageModule(this.ctx);
44
+ }
45
+ return null;
46
+ }
47
+
48
+ hasTurboModule(name: string): boolean {
49
+ return name === 'RNSVGSvgViewModule' || name === 'RNSVGRenderableModule' || name === 'RNSVGImageModule';
50
+ }
51
+ }
52
+
53
+ export class SvgPackage extends RNPackage {
54
+ createTurboModulesFactory(ctx: TurboModuleContext): TurboModulesFactory {
55
+ MyLog.e('[kuang] SvgPackage createTurboModulesFactory = ', JSON.stringify(ctx));
56
+ return new SvgTurboModulesFactory(ctx);
57
+ }
58
58
  }
@@ -1,7 +1,7 @@
1
- {
2
- module: {
3
- name: 'svg',
4
- type: 'har',
5
- deviceTypes: ['default'],
6
- },
7
- }
1
+ {
2
+ module: {
3
+ name: 'svg',
4
+ type: 'har',
5
+ deviceTypes: ['default'],
6
+ },
7
+ }
@@ -1,8 +1,8 @@
1
- {
2
- "string": [
3
- {
4
- "name": "page_show",
5
- "value": "page from npm package"
6
- }
7
- ]
8
- }
1
+ {
2
+ "string": [
3
+ {
4
+ "name": "page_show",
5
+ "value": "page from npm package"
6
+ }
7
+ ]
8
+ }
@@ -1,8 +1,8 @@
1
- {
2
- "string": [
3
- {
4
- "name": "page_show",
5
- "value": "page from npm package"
6
- }
7
- ]
8
- }
1
+ {
2
+ "string": [
3
+ {
4
+ "name": "page_show",
5
+ "value": "page from npm package"
6
+ }
7
+ ]
8
+ }
@@ -1,8 +1,8 @@
1
- {
2
- "string": [
3
- {
4
- "name": "page_show",
5
- "value": "page from npm package"
6
- }
7
- ]
8
- }
1
+ {
2
+ "string": [
3
+ {
4
+ "name": "page_show",
5
+ "value": "page from npm package"
6
+ }
7
+ ]
8
+ }
package/harmony/svg/ts.ts CHANGED
@@ -1,8 +1,8 @@
1
- /*
2
- * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
3
- * Use of this source code is governed by a MIT license that can be
4
- * found in the LICENSE file.
5
- */
6
-
7
- export * from './src/main/ets/SvgPackage'
1
+ /*
2
+ * Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
3
+ * Use of this source code is governed by a MIT license that can be
4
+ * found in the LICENSE file.
5
+ */
6
+
7
+ export * from './src/main/ets/SvgPackage'
8
8
  export * from './src/main/ets/RNSVGSvgViewModule'
package/harmony/svg.har CHANGED
Binary file
@@ -1,55 +1,55 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "LocalSvg", {
7
- enumerable: true,
8
- get: function () {
9
- return _css.LocalSvg;
10
- }
11
- });
12
- Object.defineProperty(exports, "SvgCss", {
13
- enumerable: true,
14
- get: function () {
15
- return _css.SvgCss;
16
- }
17
- });
18
- Object.defineProperty(exports, "SvgCssUri", {
19
- enumerable: true,
20
- get: function () {
21
- return _css.SvgCssUri;
22
- }
23
- });
24
- Object.defineProperty(exports, "SvgWithCss", {
25
- enumerable: true,
26
- get: function () {
27
- return _css.SvgWithCss;
28
- }
29
- });
30
- Object.defineProperty(exports, "SvgWithCssUri", {
31
- enumerable: true,
32
- get: function () {
33
- return _css.SvgWithCssUri;
34
- }
35
- });
36
- Object.defineProperty(exports, "WithLocalSvg", {
37
- enumerable: true,
38
- get: function () {
39
- return _css.WithLocalSvg;
40
- }
41
- });
42
- Object.defineProperty(exports, "inlineStyles", {
43
- enumerable: true,
44
- get: function () {
45
- return _css.inlineStyles;
46
- }
47
- });
48
- Object.defineProperty(exports, "loadLocalRawResource", {
49
- enumerable: true,
50
- get: function () {
51
- return _css.loadLocalRawResource;
52
- }
53
- });
54
- var _css = require("react-native-svg/css");
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "LocalSvg", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _css.LocalSvg;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "SvgCss", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _css.SvgCss;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "SvgCssUri", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _css.SvgCssUri;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "SvgWithCss", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _css.SvgWithCss;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "SvgWithCssUri", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _css.SvgWithCssUri;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "WithLocalSvg", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _css.WithLocalSvg;
40
+ }
41
+ });
42
+ Object.defineProperty(exports, "inlineStyles", {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _css.inlineStyles;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, "loadLocalRawResource", {
49
+ enumerable: true,
50
+ get: function () {
51
+ return _css.loadLocalRawResource;
52
+ }
53
+ });
54
+ var _css = require("react-native-svg/css");
55
55
  //# sourceMappingURL=index.js.map
@@ -1,26 +1,26 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _exportNames = {};
7
- Object.defineProperty(exports, "default", {
8
- enumerable: true,
9
- get: function () {
10
- return _ReactNativeSVG.default;
11
- }
12
- });
13
- var _ReactNativeSVG = _interopRequireWildcard(require("react-native-svg/src/ReactNativeSVG"));
14
- Object.keys(_ReactNativeSVG).forEach(function (key) {
15
- if (key === "default" || key === "__esModule") return;
16
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
17
- if (key in exports && exports[key] === _ReactNativeSVG[key]) return;
18
- Object.defineProperty(exports, key, {
19
- enumerable: true,
20
- get: function () {
21
- return _ReactNativeSVG[key];
22
- }
23
- });
24
- });
25
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {};
7
+ Object.defineProperty(exports, "default", {
8
+ enumerable: true,
9
+ get: function () {
10
+ return _ReactNativeSVG.default;
11
+ }
12
+ });
13
+ var _ReactNativeSVG = _interopRequireWildcard(require("react-native-svg/src/ReactNativeSVG"));
14
+ Object.keys(_ReactNativeSVG).forEach(function (key) {
15
+ if (key === "default" || key === "__esModule") return;
16
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
17
+ if (key in exports && exports[key] === _ReactNativeSVG[key]) return;
18
+ Object.defineProperty(exports, key, {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _ReactNativeSVG[key];
22
+ }
23
+ });
24
+ });
25
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
26
26
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { SvgCss, SvgCssUri, SvgWithCss, SvgWithCssUri, inlineStyles } from 'react-native-svg/css';
2
- import { LocalSvg, WithLocalSvg, loadLocalRawResource } from 'react-native-svg/css';
3
- export { SvgCss, SvgCssUri, SvgWithCss, SvgWithCssUri, inlineStyles, LocalSvg, WithLocalSvg, loadLocalRawResource };
1
+ import { SvgCss, SvgCssUri, SvgWithCss, SvgWithCssUri, inlineStyles } from 'react-native-svg/css';
2
+ import { LocalSvg, WithLocalSvg, loadLocalRawResource } from 'react-native-svg/css';
3
+ export { SvgCss, SvgCssUri, SvgWithCss, SvgWithCssUri, inlineStyles, LocalSvg, WithLocalSvg, loadLocalRawResource };
4
4
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
- export * from 'react-native-svg/src/ReactNativeSVG';
2
- export { default } from 'react-native-svg/src/ReactNativeSVG';
1
+ export * from 'react-native-svg/src/ReactNativeSVG';
2
+ export { default } from 'react-native-svg/src/ReactNativeSVG';
3
3
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,54 +1,52 @@
1
- {
2
- "name": "@react-native-ohos/react-native-svg",
3
- "version": "15.12.1-rc.1",
4
- "description": "",
5
- "react-native": "src/index",
6
- "main": "lib/commonjs/index",
7
- "module": "lib/module/index",
8
- "types": "lib/typescript/index.d.ts",
9
- "scripts": {
10
- "prepack": "bob build",
11
- "prepublishOnly": "npm run prepack && react-native verify-package-harmony --package-path . --skip-checks oh_package_name_is_derived_from_npm_package_name",
12
- "update_version": "node ./scripts/update-version.js",
13
- "deploy": "node ./scripts/deploy.js",
14
- "codegen-lib": "react-native codegen-lib-harmony --no-safety-check --npm-package-name react-native-svg --cpp-output-path ./harmony/svg/src/main/cpp/generated --ets-output-path ./harmony/svg/src/main/ets/generated --cpp-components-spec-paths ./node_modules/react-native-svg/src/fabric"
15
- },
16
- "author": "",
17
- "license": "MIT",
18
- "peerDependencies": {
19
- "react": "*",
20
- "react-native": "*",
21
- "react-native-svg": "15.12.0"
22
- },
23
- "devDependencies": {
24
- "@rnoh/react-native-harmony-cli": "./packages/rnoh-react-native-harmony-cli-0.77.10.tgz",
25
- "@react-native-community/cli": "15.0.1",
26
- "@tsconfig/react-native": "^3.0.0",
27
- "@types/jest": "^29.5.1",
28
- "@types/node": "^24.0.8",
29
- "@types/react": "^19.1.7",
30
- "@types/react-native": "^0.71.6",
31
- "react-native-builder-bob": "^0.20.4",
32
- "typescript": "^5.8.3"
33
- },
34
- "harmony": {
35
- "alias": "react-native-svg",
36
- "redirectInternalImports": true
37
- },
38
- "files": [
39
- "harmony",
40
- "src",
41
- "lib",
42
- "css",
43
- "./*.json"
44
- ],
45
- "react-native-builder-bob": {
46
- "source": "src",
47
- "output": "lib",
48
- "targets": [
49
- "commonjs",
50
- "module",
51
- "typescript"
52
- ]
53
- }
54
- }
1
+ {
2
+ "name": "@react-native-ohos/react-native-svg",
3
+ "version": "15.12.1-rc.2",
4
+ "description": "",
5
+ "react-native": "src/index",
6
+ "main": "lib/commonjs/index",
7
+ "module": "lib/module/index",
8
+ "types": "lib/typescript/index.d.ts",
9
+ "scripts": {
10
+ "update_version": "node ./scripts/update-version.js",
11
+ "deploy": "node ./scripts/deploy.js",
12
+ "codegen-lib": "react-native codegen-lib-harmony --no-safety-check --npm-package-name react-native-svg --cpp-output-path ./harmony/svg/src/main/cpp/generated --ets-output-path ./harmony/svg/src/main/ets/generated --cpp-components-spec-paths ./node_modules/react-native-svg/src/fabric"
13
+ },
14
+ "author": "",
15
+ "license": "MIT",
16
+ "peerDependencies": {
17
+ "react": "*",
18
+ "react-native": "*",
19
+ "react-native-svg": "15.12.0"
20
+ },
21
+ "devDependencies": {
22
+ "@rnoh/react-native-harmony-cli": "./packages/rnoh-react-native-harmony-cli-0.77.10.tgz",
23
+ "@react-native-community/cli": "15.0.1",
24
+ "@tsconfig/react-native": "^3.0.0",
25
+ "@types/jest": "^29.5.1",
26
+ "@types/node": "^24.0.8",
27
+ "@types/react": "^19.1.7",
28
+ "@types/react-native": "^0.71.6",
29
+ "react-native-builder-bob": "^0.20.4",
30
+ "typescript": "^5.8.3"
31
+ },
32
+ "harmony": {
33
+ "alias": "react-native-svg",
34
+ "redirectInternalImports": true
35
+ },
36
+ "files": [
37
+ "harmony",
38
+ "src",
39
+ "lib",
40
+ "css",
41
+ "./*.json"
42
+ ],
43
+ "react-native-builder-bob": {
44
+ "source": "src",
45
+ "output": "lib",
46
+ "targets": [
47
+ "commonjs",
48
+ "module",
49
+ "typescript"
50
+ ]
51
+ }
52
+ }
package/src/css/index.tsx CHANGED
@@ -1,20 +1,20 @@
1
- import {
2
- SvgCss,
3
- SvgCssUri,
4
- SvgWithCss,
5
- SvgWithCssUri,
6
- inlineStyles,
7
- } from 'react-native-svg/css';
8
-
9
- import { LocalSvg, WithLocalSvg, loadLocalRawResource } from 'react-native-svg/css';
10
-
11
- export {
12
- SvgCss,
13
- SvgCssUri,
14
- SvgWithCss,
15
- SvgWithCssUri,
16
- inlineStyles,
17
- LocalSvg,
18
- WithLocalSvg,
19
- loadLocalRawResource,
1
+ import {
2
+ SvgCss,
3
+ SvgCssUri,
4
+ SvgWithCss,
5
+ SvgWithCssUri,
6
+ inlineStyles,
7
+ } from 'react-native-svg/css';
8
+
9
+ import { LocalSvg, WithLocalSvg, loadLocalRawResource } from 'react-native-svg/css';
10
+
11
+ export {
12
+ SvgCss,
13
+ SvgCssUri,
14
+ SvgWithCss,
15
+ SvgWithCssUri,
16
+ inlineStyles,
17
+ LocalSvg,
18
+ WithLocalSvg,
19
+ loadLocalRawResource,
20
20
  };
package/src/index.tsx CHANGED
@@ -1,3 +1,3 @@
1
- export * from 'react-native-svg/src/ReactNativeSVG';
2
-
1
+ export * from 'react-native-svg/src/ReactNativeSVG';
2
+
3
3
  export { default } from 'react-native-svg/src/ReactNativeSVG';
package/tsconfig.json CHANGED
@@ -1,12 +1,12 @@
1
- {
2
- "extends": [
3
- "@tsconfig/react-native/tsconfig.json",
4
- ],
5
- "compilerOptions": {
6
- "noEmit": false
7
- },
8
- "exclude": [
9
- "lib",
10
- "harmony"
11
- ]
1
+ {
2
+ "extends": [
3
+ "@tsconfig/react-native/tsconfig.json",
4
+ ],
5
+ "compilerOptions": {
6
+ "noEmit": false
7
+ },
8
+ "exclude": [
9
+ "lib",
10
+ "harmony"
11
+ ]
12
12
  }
@@ -1,8 +0,0 @@
1
- export let presets: string[];
2
- export let plugins: (string | {
3
- alias: {
4
- '@react-native-community/push-notification-ios': string;
5
- };
6
- cwd: string;
7
- })[][];
8
- //# sourceMappingURL=babel.config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"babel.config.d.ts","sourceRoot":"","sources":["../../babel.config.js"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export let presets: string[];
2
- export let plugins: string[];
3
- //# sourceMappingURL=babel.config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"babel.config.d.ts","sourceRoot":"","sources":["../../../example/babel.config.js"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const AppParamsContext: React.Context<undefined>;
3
- //# sourceMappingURL=contexts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../../../example/contexts.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,gBAAgB,0BAAiC,CAAC"}
@@ -1,2 +0,0 @@
1
- export { hapTasks } from '@ohos/hvigor-ohos-plugin';
2
- //# sourceMappingURL=hvigorfile.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hvigorfile.d.ts","sourceRoot":"","sources":["../../../../../example/harmony/entry/hvigorfile.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,2 +0,0 @@
1
- export { appTasks } from '@ohos/hvigor-ohos-plugin';
2
- //# sourceMappingURL=hvigorfile.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hvigorfile.d.ts","sourceRoot":"","sources":["../../../../example/harmony/hvigorfile.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../example/index.js"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- declare const _exports: any;
2
- export = _exports;
3
- //# sourceMappingURL=jest.config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jest.config.d.ts","sourceRoot":"","sources":["../../../example/jest.config.js"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- declare const _exports: any;
2
- export = _exports;
3
- //# sourceMappingURL=metro.config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"metro.config.d.ts","sourceRoot":"","sources":["../../../example/metro.config.js"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export let project: {};
2
- export let assets: string[];
3
- //# sourceMappingURL=react-native.config.d.ts.map